![User profile image.](/sites/default/files/pictures/image.jpg)
London
Mario Corchero is a Senior Software Developer at Bloomberg, where he uses Python and C++ to write small reusable services to automate the generation of news and manage the infrastructure around News Search.
Mario Corchero is a Senior Software Developer at Bloomberg, where he uses Python and C++ to write small reusable services to automate the generation of news and manage the infrastructure around News Search.
Authored Comments
Well spotted! Thanks a lot, Should be fixed now
Thanks for you comment Greg!
Note that `date.today()` takes the current day based on the timezone of the machine where your software is running, which I personally find far from ideal. I'd suggest specifying explicitly the timezone so you don't rely on however your machine timezone is configured.
See as an example:
```
>>> dt.datetime.now(gettz("Australia/Melbourne")).date()
datetime.date(2017, 5, 13)
>>> dt.datetime.now(gettz("America/New_York")).date()
datetime.date(2017, 5, 12)
```
Also, it is not that your program needs to be a swiss army knife, but that you want your software to work no matter the location where it is deployed.
About the string serialization of dates, it really depends on who/what is the consumer but I always recommends to stick to standards.