Welcome Guest, Not a member yet? Register   Sign In
Timezone handling suggestions with CI4
#2

I too am on the crossroad with dates for a new project i am about to start - and dates will be crucial here, as users will be spread across 3 continents at least.

After reading a bit - it is indeed the most common scenario to keep dates in UTC in the database (no surprises there). However i think that the the $appTimezone setting is just the default app time to be displayed (no conversions are made there) - its just used in system/CodeIgniter.php like date_default_timezone_set($this->config->appTimezone ?? 'UTC'); so that when you call date() it returns based on your current timezone setting.

That said i think that requests containing dates to be written in the database should be intercepted and modified. I am looking for a convenient way to do that (as dates will be used massively in my app).

I am also open to any suggestions
Reply


Messages In This Thread
RE: Timezone handling suggestions with CI4 - by korgoth - 04-30-2020, 01:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB