Hacker News new | past | comments | ask | show | jobs | submit login

This is perhaps just my ignorance, but when do you find yourself needing to set the timezone like that? Not in 10+ years of C programming have I ever had to do that.



I assume doing something on behalf of a remote user and still convinced locales can do a thing other than hurt you.


In most of the time, you just set it on program start and never change. This is quite common for programs that expects UTC.

Searching in github, other example are:

  1) `jq` parsing datetime
  2)  systemd , timectl printing status
  3) Unit tests 
  4) Some RDP client update its own timezone with server timezone


I might do that if I am writing a quick-and-dirty program that works with times in multiple time zones and I can’t be bothered to find a library with a better API.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: