PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
GeXus
Forum Regular
Posts: 631 Joined: Sat Mar 11, 2006 8:59 am
Post
by GeXus » Mon Sep 24, 2007 9:57 am
There are two methods to handle different time zones (at least that I know of)...
1. Take the GMT time and use math to add/subtract relative to whatever time zone you select.
2. Use putenv() to actually set the TZ variable.
Which way would you guys say is the best? If it even matters..
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Sep 24, 2007 12:00 pm
Best in terms of...?
Offsetting from GMT is most portable, but requires the code to know what offset to use.
GeXus
Forum Regular
Posts: 631 Joined: Sat Mar 11, 2006 8:59 am
Post
by GeXus » Mon Sep 24, 2007 12:52 pm
feyd wrote: Best in terms of...?
Offsetting from GMT is most portable, but requires the code to know what offset to use.
Okay, yeah that works... I have the offsets... thanks!