• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time Zone Trouble

I've been experimenting with time zones in CI...

To me, when it comes to time zones, PHP seems to have so over-complicated something that could, and should, be very much simpler... and although I understand CI needs to work around and within PHP's sometimes suckiness... I was wondering if there was a clever way to get around using PHP's horribly labelled time zones, but still get some of the functionality (whereby the time written to the database is always in terms of the unix timestamp, using time()-type functions, and the (DST-corrected) time displayed to the user is zone'd time, using date()-type functions)... without having to resort to writing one's own functions to manage it manually?

As a demonstration of functionality that would be easier to manage (and, more importantly, to store) for individual users can be found on this forum site- if one goes to your profile's 'Edit options' Date and Time Options setting...

And what currently seem to exist in CI is inline with PHP's time zones, and is along the lines of:
echo timezone_select('custom-select', 'America/New_York');


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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