I have that in the default.py file. I will send the code when I get to my computer.
Thank you, Jeff Riley > On Jul 7, 2016, at 5:10 PM, Marlysson Silva <marlyss...@gmail.com> wrote: > > Where you are inicialize session.plugin_timezone_tx ? > > I too already had this issue, this happen because the script get timezone > based on the server localization. > > I solved this using other way, converting user timezone to UTC and at showing > converted in user timezone. > > They are some steps to do this. > > Em quinta-feira, 7 de julho de 2016 16:19:10 UTC-3, Jeff Riley escreveu: >> >> 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 a topic in the Google > Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/wL2y7s-FJWU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.