3 ms·
This article does not make any sense. You don't get a timestamp from nowhere without knowing the kind of time it references: local or UTC or fixed to anything l
by greatgib 4y ago
This article does not make any sense. You don't get a timestamp from nowhere without knowing the kind of time it references: local or UTC or fixed to anything like client time.
For python the important thing to understand is the difference between tz aware and naive datetime objects. But after you can do depending on your needs.
For example, if you ensure to convert your inputs to UTC and output UTC also, you can easily just work with utcnow by only dealing with UTC internally.
You would have to do that to store datetime in MySQL for example.
- Dunedan 4y ago> You don't get a timestamp from nowhere without knowing the kind of time it references: local or UTC or fixed to anything like client time. Imagine you have a software which deals with CSV files sent by clients. Clients are international corporations. What's the timezone the datetimes in the CSV files belongs to?
- greatgib 4y agoSomething has generated this file no? Timestamp has nothing to do with the problem. If you get dates without timezone or any info with your CSV, you can't deduce anything. That has nothing to do with the api used in python to decode it...