Skip to main content

Questions tagged [timezone]

When using or applying a TZ value.

Filter by
Sorted by
Tagged with
2 votes
1 answer
25 views

MinGW/MSys 2 doesn't seem to recognize TZ environment variable

I work on a legacy system originally written in C for 3b2 SVR3, later in C++ for Sun/Solaris, now mainly for Linux. We have a few users who require our apps to run on Windows Servers, so we have ...
0 votes
1 answer
45 views

How do I get a locale or timezone used on Venus?

In this answer, Stéphane Chazelas uses a UVC timezone and vs_VS locale. When I asked about them, the reply was that these are the timezone and locale used on ... Venus. I'm not entirely sure whether ...
0 votes
1 answer
58 views

Cron time zone won't work on an AWS based EC2 instance

I have an EC2 instance that runs linux. The timezone is set to UTC time and I need my cron tasks to work on UK timezone. However, I am unable to change the system clock to the UK timezone. It must ...
9 votes
1 answer
2k views

Incorrect automatic time zone

I've noticed that the automatic time zone detection functionality of my GNOME 3 (Arch Linux) is not working correctly. My actual time zone is PST (UTC-08), but if I toggle on the "Automatic Time ...
0 votes
0 answers
42 views

Timedatectl output does not change after running ntpdate command in Kali Linux

I am currently doing a pen testing CTF challenge on HacktheBox.com (HTB) that involves manipulation of Kerberos TGT tickets so need to sync my local system time on my Kali Linux instance with the ...
3 votes
3 answers
3k views

Hardware and system clock gets offset by roughly 7 minutes on each boot although locale and time zone are correct

On each boot into Arch, I see that the time is off by a few minutes. The RTC time is off (as far as I understood, it has "drifted".) and affects the hardware clock. $ timedatectl status ...
0 votes
1 answer
59 views

Where does `date` get the system timezone from?

I always thought Linux systems used /etc/timezone for the timezone, but: $ cat /etc/timezone Etc/UTC $ date Tue May 28 12:34:01 PM PDT 2024 Here, the /etc/timezone is UTC but date is reporting in ...
1 vote
4 answers
12k views

Hardware and System clock both wrong in linux

I dual booted my laptop and installed EndeavourOS (while other OS being windows 10) Due to this, my hardware and system clock both show the wrong time. I have set the correct time zone (UTC+5:30), ...
3 votes
1 answer
65 views

how to execute cron jobs based on user's time zones

I'm facing challenges in implementing a cron job for our daily check-in feature. Our goal is to send a push notification alarm daily to remind users to check in if they haven't already. The timing of ...
0 votes
0 answers
26 views

My Centos machines revert time after reboot

I have 3 machines on VMware ESXi v6.5. I set time manually: timedatectl set-time '16:00:00'` and check time with `timedatectl [root@abcd ~]# timedatectl Local time: Sun 2024-04-07 16:00:30 +430 ...
8 votes
1 answer
3k views

Different timestamps in SFTP "ls -l" vs. "ls -lh"

I have a 3rd-party SFTP server on which I want to check some file timestamps. However, I do get different results for the same file if I use ls -l vs. ls -lh: sftp> ls -l [...] -rwxrwxrwx 1 0 ...
9 votes
3 answers
18k views

`timedatectl set-timezone` doesn't update `/etc/timezone`

I expected that timedatectl would update /etc/timezone when changing timezones, but no: % sudo timedatectl set-timezone 'Asia/Kuala_Lumpur' % cat /etc/timezone Asia/Bangkok Is there a reason that it ...
2 votes
3 answers
52 views

Is Linux /usr/share/zoneinfo/ Platform Agnostic?

I am working with an embedded Linux (ARM/busybox) system. It has systemd and the timedatectl system executable, but it does not have /etc/timezone, /usr/share/zoneinfo, nor the zic timezone data ...
3 votes
2 answers
4k views

How to prevent tzdata updates on CentOS resetting /etc/localtime

I am using a local timezone (non-UTC) on my server. Whenever I update the tzdata via yum, the system resets /etc/localtime to the default file and I am back on UTC. While #date still shows the ...
14 votes
3 answers
42k views

How can I easily change my time-zone in Arch/Xfce?

Since I move around, I need to be to change time-zones frequently. I'm on Arch/Xfce. How can I do that? I've tried right click on the watch on the top panel -> properties -> time settings -> time zone....
0 votes
2 answers
62 views

Change special hh mm to another time zone

I want to change 0710 (07 hour 10 minute in GMT +0) to 0810 (08 hour 10 minute in GMT +1) what command in linux can do it? Thank you for your support !
25 votes
4 answers
24k views

Automatically set Linux timezone according to location

How can we automatically set the system default timezone in Linux using the Internet? As I see it, NTP servers can update only time, but not timezone. Is there any server that can change the timezone?
4 votes
1 answer
7k views

system clock is off by one hour after every reboot

Every time I start my laptop, the clock is off by exactly one hour. I have to run ntpdate to fix it. Next time I restart the laptop, it will be off again. I have timezone set up correctly. I am ...
25 votes
4 answers
8k views

Should I (still) use UTC for all my servers?

My employer is located in Europe (CET), and therefore we use daylight saving time, which requires shifting an hour hence and forth twice a year. Our servers are running in the cloud in different ...
32 votes
4 answers
24k views

Why does TZ=UTC-8 produce dates that are UTC+8?

The current time in Los Angeles is 18:05. But when I run TZ=UTC-8 date --iso=ns, I get: 2013-12-07T10:05:37,788173835+0800 The date utility tells me that the time is 10:05, and even says that it's ...
0 votes
1 answer
358 views

timedatectl shows wrong local time

this the output of my timedatectl command on a proxmox VM running on a server in New Zealand with static IP: $ timedatectl Local time: Wed 2023-11-01 16:01:30 UTC Universal ...
1 vote
1 answer
212 views

Add hours to the date and time

I have a requirement to add offset hours to the datetime value. Get the previous date (e.g. 2023-10-19 00:00:00.000000) previous_date=`TZ=TZ+24 date '+%Y-%m-%d 00:00:00.000000'` Calculate the ...
0 votes
0 answers
30 views

What environment variables should I track to explain a 10 minutes difference on a timestamp sent by a front application and received by a backend one?

Two Linux computers, I'm not knowing yet their exact settings, are running: A front application, for the first A backend application, for the second I face the trouble that what the backend receives,...
4 votes
1 answer
3k views

How to fix NixOS localtime service?

Setting services.localtime.enable = true; should start a "simple daemon for keeping the system timezone up-to-date based on the current location.", but it doesn't: Failed to get target of /etc/...
-1 votes
1 answer
151 views

Dualboot | After synced time on windows linux time is wrong

After i synced the windows time my hardware clock time is bad. timedatectl Local time: Sun 2023-10-01 15:38:05 CEST Universal time: Sun 2023-10-01 13:38:05 UTC ...
13 votes
2 answers
5k views

Why is zone.tab missing so many time zones?

There are over a thousand time zone files on your typical *nix box (in /user/share/zoneinfo). Many of them vary only in historical dates which have little relevance for programs which care only about ...
0 votes
0 answers
536 views

Why jouranlctl uses --utc by default when running without root privigies?

On a host running Ubuntu 20.04 LTS I notice that, by default, journalctl (without root privileges) is the same as journalctl --utc, but with root privileges journalctl honors the time zone (as shown ...
1 vote
1 answer
2k views

What is %z useful for in GNU date?

I'm in the UK running these 2 commands (using gdate as I'm on a Mac with date (GNU coreutils) 8.32 installed): # A UK winter date, timezone in UK at this time is GMT = UTC $ gdate '--date=TZ="...
6 votes
2 answers
2k views

How can I set a time zone on a Linux machine that has only very minimal cmds available?

I have a Linux machine that only has very minimal cmds available on it, for example the /bin looks like this: /bin# ls ash chattr clockdiff dd dumpkmap ...
0 votes
1 answer
518 views

How to update time zone list in Linux (Debian)?

I'm going to set time zone to my locale on Debian. The DST has been removed in my region since the last year (2022, Sep.), but it's apparently not updated in Debian time zone list. What is the best ...
2 votes
3 answers
439 views

For what do you need to change hardwareclock and how?

I started Linux server (Amazon Linux 2) from scratch. I'm in Tokyo locale and I changed timezone info like this; ll /etc/localtime # lrwxrwxrwx 1 root root 25 Feb 22 10:11 /etc/localtime -> ../usr/...
2 votes
0 answers
313 views

Add timezone to HAProxy logs

I have a HAProxy (2.2.9) running on an Debian 11 machine and I would like to add the timezone to the HAProxy logs like Apache has: [25/Jul/2023:14:27:40 +0200]. I have found that I can use the log-...
189 votes
7 answers
319k views

How can I have `date` output the time from a different time zone?

I have a server running with the time zone set to UTC. It seemed like that was generally a good practice (please correct me if I'm wrong). Anyhow, one of the servers I connect to, in order to scp ...
4 votes
3 answers
812 views

Why is there a difference between timezone America/Chicago (CST6CDT) and Etc/GMT-6?

Here is my code: #include <time.h> #include <stdio.h> time_t my_timegm (struct tm *tm, char *tz_offset); int main (void) { struct tm time_tm; time_t start_timet, end_timet; ...
16 votes
2 answers
9k views

What's the difference between localtime and timezone files?

I'm setting up a docker container and there are two places where the timezone are set: /etc/localtime /etc/timezone Can anybody explain me what's the difference between them and what are both used ...
12 votes
1 answer
12k views

How to disable DST changes for a timezone?

My system timezone is Asia/Tehran, and it has DST changes adjusts in Summer (spring forward) and fall back in Winter; however I do need to disable these DST adjustments and keep timezone always in UTC+...
0 votes
1 answer
190 views

How to change DST start and end dates for a timezone in Red Hat Enterprise Linux and Oracle Linux?

DST start and end dates keep changing over the years for different timezones. For example, I found below link where DST start and end dates are provided for EST for different years. https://www....
4 votes
1 answer
721 views

How do I allow a non-root user to set the timezone via d-bus?

I am writing an application on an embedded Linux device that sets the Timezone as a non-root user. To boil things down to the essence, I want to execute this: dbus-send --system --dest=org....
0 votes
1 answer
303 views

How to fix Gnome Clock on Bar (date command seems to not use correct timezone)

Fedora 37 with Gnome Shell 43. On Status Bar on the top I see wrong time. But When I opening Gnome Clock app (this one https://wiki.gnome.org/Apps/Clocks) then I see correct time Also when I typing ...
1 vote
1 answer
964 views

Use a different timezone for one cron job?

I have multiple cron jobs in one crontab (as usual). One of the jobs interacts with a remote system in another timezone, which means I need to adjust the crontab every time either timezone enters or ...
1 vote
2 answers
755 views

Where can I find a list of timezone options available during install process of a distro?

I'm building an app where it makes sense for the user to be able to select a different timezone than their actual own timezone for certain operations, without going too much into details, I can assure ...
1 vote
5 answers
2k views

Linux: robust way to get Timezone in form Continent/City

I'm looking for a portable/robust way to obtain timezone of a Linux box (mainly different versions of Debian) in form of Continent/City, like Europe/Kiev. Till now I did it using timedatectl status | ...
2 votes
1 answer
2k views

How to change the time zone string of date command?

I'm curious about how to change the abbreviation of time zone shown by date command. Let the time zone unchanged, but how to change CST below to UTC+8? clay@LAPTOP-3PP2093I:~$ date Thu Dec 1 23:05:28 ...
0 votes
2 answers
971 views

In Linux distribution the list of timezones is empty

In a yocto-base Linux distribution is available the program timedatectl and it is necessary to set the timezone. To do that exist the command: timedatectl set-timezone <timezone> The execution ...
1 vote
1 answer
35 views

Can `cal` show other Gregorian adoptions?

On my host I can show the adoption of the Gregorian calendar as it occurred for Great Britain and its colonies in 1752: $ cal september 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 ...
3 votes
2 answers
3k views

Why does `date` ignore TZ environment variable?

On Ubuntu 18.04, I have the following behavior of date: $ date --version | head -n1 date (GNU coreutils) 8.28 $ date Вт окт 8 13:18:18 MSK 2019 $ TZ=UTC date Вт окт 8 10:18:23 UTC 2019 So far so ...
0 votes
3 answers
6k views

How can I install the TZ database on an embedded Linux platform?

I have an embedded Linux device for which the stock operating system image does not include the TZ database files usually found in /usr/share/zoneinfo. I wish to enhance the device in order to be ...
4 votes
2 answers
14k views

How do I make cron use UTC?

My local time zone is not UTC; How do I make cron use UTC for it's schedule without changing time zone on the computer in other aspects?
0 votes
1 answer
1k views

Change tmux local time

I'm working on a Linux server who is in a different time zone than me. How can I make tmux display, in the status bar, my local time, instead of the server local time (without messing up the server ...
3 votes
3 answers
2k views

When date and timedatectl?

About reporting and settings for date and time exists available the date and timedatectl commands - it according with the most common results available through the web. Practically both do the same. ...

1
2 3 4 5 6