Closed Marlysson closed 7 years ago
@Marlysson I think is useless as weppy now uses pendulum for the now object, so if you need to always use a specific timezone you can just write a 1 line method for that:
from weppy import now
def local_now():
return now().in_timezone("Europe/Berlin")
Hmm ..
It's because the Request object have the now
method that is expose at end of file.. and too have the method local_now ..
But then import the now method ( that is expose in globals file ) and overwrite it with behavior that I want.
Caution: now
it's not necessarily request.now
. The now
function defined in globals it's not just an exposure of the request method. It's evaluated dependently on the context. The fact request has a local_now
it's just for a backward compatibility reference.
What you think about expose the now_local method from Request object as line now method to use the local timezone and not UTC ..