My only problem with using the localtime() is I have users from different timezones using the app... if I use the localtime() it will pull which ever time the user is on and put in.. which is becoming messier while tracking and in the audit trail so I used gmtime to make time fixed to Eastern US time zone...Is there a easy way to figure out the time zone a user is in so that i can use the offset from UTC?
We need to know more about how your users interact with the application. If they are logged on to the server then localtime will return the server's local time unless they set the TZ environment variable. If we are talking about a web-based application then the application will only know about the server's local time unless you ask the users to tell what their local timezone is.
My recommendation would be to store all times in UTC (as that's the only timezone guaranteed not to change). Store your users' local timezones in their user configuration details and use that data to translate UTC to their local time when displaying data to them (or accepting data from them).
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg
In reply to Re^3: Time Issues
by davorg
in thread Time Issues
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |