Just in case anyone is wondering why I would build such a strange little
web app, it is for my personal use. I was dianosed with brain cancer 6
weeks ago and these are the items my doctors want me to track everyday. So
I thought Web2py would be perfect.
On Thursday, July 7, 2016 at 2:19:10 PM UTC-5, Jeff Riley wrote:
>
> Hello all. Me again. I have run into an interesting issue. I have
> installed and followed niphlod's w2p_timezone_plugin. In order to make it
> work on my local PC I need to setup my db.py as follows.
>
> import pytz
> user_timezone = session.plugin_timezone_tx or 'UTC'
>
>
> db.define_table('events',
> Field('event_time', 'datetime', default = request.now, update
> = request.now,
> requires=IS_DATETIME(format=('%m-%d-%Y %H:%M'),
> timezone=pytz.timezone(user_timezone))),
>
>
> But to get it to work on pythonanywhere.com I have to setup my db.py as
> follows. Any ideas why?
>
>
> import pytz
>
> db.define_table('events',
> Field('event_time', 'datetime', default = request.now, update
> = request.now,
> requires=IS_DATETIME(format=('%m-%d-%Y %H:%M'),
> timezone=pytz.timezone("US/Central"))),
>
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.