Currently I am setting time zone GMT+5 on my Linux CentOS 7 machine by linking /etc/localtime to /usr/share/zoneinfo/Etc/GMT-5.

I want to create a zone info file for example /usr/share/zoneinfo/Etc/GMT-5:30 that enables me to set the current timezone to GMT+5:30 without having to worry about DST changes.

I am aware that I could link /etc/localtime to /usr/share/zoneinfo/Asia/Kolkata for example but then I will have to worry about DST changes even if it may not be implemented in the mean time.

Also I am aware of TZ=GMT+5:30; export $TZ but I am worried that this approach backfire for some reason in the future.

  • 1
    5:30 or 5:45 (as per headline)? – Romeo Ninov Feb 1 at 18:59
  • 3
    Why do you think that when you use a timezone file delivered with the system and updated through the usual channels, you will have to worry about DST changes? If your computer's displayed time should match the official time in Kolkata, using that tz file is the proper thing to do. – Hans-Martin Mosner Feb 1 at 19:49
  • Because I have services running on this machine that depends on non-DST time zones which are in 'Etc/GMT+-<hour>'. Etc time zones are guaranteed not to be updated. I am asking for something that provides the same guarantee but as 'GMT+-<hour1>::<minute> format not only hours. – Muhammad Charaf Feb 1 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.