Yes... You are right I could. It was late, I was heading to bed, and I
just threw the last question in :)

-Thadeus





On Thu, Dec 31, 2009 at 7:22 AM, Guido Kollerie <[email protected]> wrote:
> On 31 dec 2009, at 09:19, Thadeus Burgess wrote:
>
>> Are dates stored in the database as UTC?
>
> Should depend on database configuration (timezone settting) I presume.
>
>> How do you convert the dates between UTC / locale ?
>
> Use pytz (http://pypi.python.org/pypi/pytz/)
>
> from datetime import datetime
> import pytz
> now = datetime.now(pytz.utc)
> ams_tz = pytz.timezone('Europe/Amsterdam')
> now_in_ams = now.astimezone(ams_tz)
> print "utc: %s, ams: %s" % (now, now_in_ams)
>
> See pytz docs for more info.
>
>> Is request.now in UTC?
>
> Just getting back at web2py programming and haven't got it fired up, but
> that should be easy to verify for yourself, right?
>
> --
> Guido
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to