On 10/22/08, jonwood <[EMAIL PROTECTED]> wrote:
>
>
>  cmartin-2 wrote:
>  >
>  > I suspect it is quite common, e.g., web apps built on SQLServer backends
>  > are quite likely to use UTC. At any rate, it is definitely a design
>  > decision, if one expects that local times will always work in all
>  > scenarios, but all means use local times. If design criteria change
>  > unexpectedly in the future to the point where local times become
>  > problematic, for reasons already mentioned, it will need a redesign. By
>  > using UTC from the outset, it will be robust to all possible
>  > datetime-related needs in the future.
>  >
>
>
> Yeah, I appreciate the discussion of UTC. Although I don't fully understand
>  how to convert UTC to local time on a Website, I do some Web development and
>  so I can imagine scenarios where they may be appropriate.
>

I thought it was very clearly indicated in one of the answers in this
thread on how to do that. Here it is again...

datetime('now', 'localtime')

The above function will take the current time in UTC and convert it to
localtime in the computer where it is run.

Your statement, "on a Website" is not clear. Do you want to convert
UTC to the local time of the user viewing your website or your local
time, or the local time of the server that is serving the website?

I am in USA Central, the company that is hosting my sites is in
California (I think) and their servers could be anywhere in the world
where they found cheap location for their data center. The user
looking at my website at any given site could be in... who knows
where.



-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to