• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timezone handling suggestions with CI4

#4
If you call date_default_timezone_set() in your BaseController it will override the CI's $appTimezone value. The model will use the timezone that you specified and will save recoreds in DB with your timezone.
If you store dates as timestamp you can easly format them with this CI method:
https://codeigniter4.github.io/userguide...mtimestamp
Reply


Messages In This Thread
RE: Timezone handling suggestions with CI4 - by Araveth - 06-08-2020, 09:17 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.