[yunqa.de] Re: Question about UTC and local time

  • From: "Jerry Hayes" <jhayes@xxxxxxxxxxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Sat, 5 Jul 2008 09:42:17 -0400

Per Edwin…

To conclude, If I don't need to care about different time zones, e.g. I'm
not using a database  which will be updated by users all around the world,
but just use a database in a desktop program, can I treat all datetime
values to be local time by doing the following?

 

Sure…no problem at all, but just use the ‘now’…don’t think you need to use
the ‘localtime’ modifier at all.  The ‘localtime’ ADDS your local time zone
to a date…this should only be done if the date is stored as UTC.  If you’re
store it as a regular ‘now’, not adjusted for anything, just pull it back
regular, not adjusted for anything.

 

Just plunk in your NOW dates.  Piece o’ cake.


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.4.5/1533 - Release Date: 7/3/2008
7:19 PM
 

Other related posts: