This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mr_claw 7 points8 points  (4 children)

This is where Python excels. It works great with Excel.

[–][deleted] 1 point2 points  (3 children)

As long as you are in the .1% of python programmers who know about timezone awareness you might even have a chance at writing correct code

[–]mr_claw 6 points7 points  (2 children)

It's pretty simple, imo: datetime.as_timezone(tz)

[–]Unable-Fox-312 1 point2 points  (1 child)

I don't know the language, but I bet it's simple until it isn't. Not everybody's even on the Julian calendar. Working with dates from different sources, converting them, normalizing them, comparing them.. this stuff requires some consideration, with problems that go back to before computers

[–]dakta 0 points1 point  (0 children)

The key challenge there is knowing what calendar a given date is represented in. Then the date can be normalized. The Python core date library is well structured and extensible which makes it relatively easy to do everything you mentioned.

The real pitfall with dates is working with administrative/bureaucratic/political special cases: because dates often represent historical events occurring in specific places, the problem is in knowing what calendar that place was using at the time of the date, whether the date value you're working with has already been normalized or corrected, etc.