Timezone for datetime.date objects
Morten W. Petersen
morphex at gmail.com
Sun Feb 27 05:16:56 EST 2022
Hi.
I'm working on a project where I need to query data for a given year, in
the correct timezone. For accounting purposes.
The code I worked on today is here, see also the version history:
https://github.com/morphex/ethereum-classic-taxman/blob/main/generate_csv.py
I was initially using the date object to get the right timespan, but then
found that using the right timezone with that was a bit of a pain. So I
went for the datetime object instead, specifying 0 on hour, minute and
second.
What's the thinking behind this with the date object? Wouldn't it be nice
to be able to specify a timezone?
Regards,
Morten
--
I am https://leavingnorway.info
Videos at https://www.youtube.com/user/TheBlogologue
Twittering at http://twitter.com/blogologue
Blogging at http://blogologue.com
Playing music at https://soundcloud.com/morten-w-petersen
Also playing music and podcasting here:
http://www.mixcloud.com/morten-w-petersen/
On Google+ here https://plus.google.com/107781930037068750156
On Instagram at https://instagram.com/morphexx/
More information about the Python-list
mailing list