Skip to main content

Questions tagged [timezone]

When using or applying a TZ value.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 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 ...
Anthony's user avatar
  • 101
0 votes
1 answer
55 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 ...
Jason C's user avatar
  • 1,475
3 votes
1 answer
59 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 ...
beeeeeeginer's user avatar
0 votes
0 answers
21 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 ...
charll's user avatar
  • 1
2 votes
3 answers
46 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 ...
f1fan44's user avatar
  • 33
0 votes
2 answers
59 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 !
dvthanh's user avatar
0 votes
1 answer
293 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 ...
Curu's user avatar
  • 13
1 vote
1 answer
186 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 ...
Pixel's user avatar
  • 11
0 votes
0 answers
29 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,...
Marc Le Bihan's user avatar
-1 votes
1 answer
128 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 ...
Lolis4TheWin's user avatar
0 votes
0 answers
404 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 ...
Pablo A's user avatar
  • 2,821
6 votes
2 answers
1k 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 ...
Henry's user avatar
  • 205
0 votes
1 answer
443 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 ...
Phree's user avatar
  • 3
2 votes
3 answers
413 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/...
tom's user avatar
  • 21
2 votes
0 answers
289 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-...
Mr. Diba's user avatar
  • 400
4 votes
3 answers
761 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; ...
Walter L. Preuninger II's user avatar
0 votes
1 answer
168 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....
GaneshkumarHegde's user avatar
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 ...
Patrick Bucher's user avatar
4 votes
1 answer
655 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....
Edward's user avatar
  • 145
1 vote
4 answers
11k 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), ...
V.G's user avatar
  • 127
0 votes
1 answer
268 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 ...
Daniel's user avatar
  • 141
1 vote
1 answer
897 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 ...
eapi's user avatar
  • 13
1 vote
2 answers
631 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 ...
Whiskers's user avatar
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 ...
Clay Chen's user avatar
1 vote
1 answer
31 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 ...
therealneil's user avatar
0 votes
2 answers
906 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 ...
User051209's user avatar
4 votes
2 answers
13k 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?
marbens's user avatar
  • 143
3 votes
1 answer
630 views

Is my zoneinfo backwards or am I confused

As far as I know, United States Eastern Time is GMT-5 for Eastern Standard Time, and GMT-4 for Eastern Daylight Time. So why do these two commands give different hours in the answers? laptop % TZ=...
hymie's user avatar
  • 1,740
1 vote
1 answer
291 views

zdump and date do not show the same daylight saving information

I am using my localtime set to be Israel. I updated the system clock and hardware clock, and using zdump I get: ~# zdump /usr/share/zoneinfo/Israel /usr/share/zoneinfo/Israel Wed Apr 20 16:11:36 2022 ...
Investing TS's user avatar
0 votes
1 answer
159 views

How to update a locale and timezone on a static image that isn't running

I am building an Ubuntu static image (for flashing to a USB) where I want to preset the timezone and locale in that image so that it is already set when the image boots. It appears the only way to ...
AdvApp's user avatar
  • 131
12 votes
1 answer
11k 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+...
αғsнιη's user avatar
  • 41.5k
0 votes
0 answers
923 views

timedatectl: problem with NTP returning localtime instead of UTC time

On my embedded Linux, I have a problem with time zones: I'm trying to keep the UTC time in the RTC of the device. But somehow, timedatectl keeps adjusting time to the local time and not the UTC time, ...
Jean-Loup Sabatier's user avatar
1 vote
1 answer
4k views

Format datetime as UTC with strftime (for use in git)

I can format dates and time pretty flexibly with strftime, but from what I can see, this only will give times in my local timezone; I can add the timezone offset (e.g. '%Y %m %d-%H:%M:%S%z' for a ...
jkmartin's user avatar
  • 113
0 votes
0 answers
177 views

All of the modification times for my files have been shifted by 1 hour, how can I restore them en masse?

I have two copies of my data, one of which seems to have shifted the modification times by an hour inexplicably (well, we did have a daylight switch recently). I typically use rsync to keep the two ...
CameronNemo's user avatar
  • 1,141
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 ...
Florian Brucker's user avatar
0 votes
1 answer
306 views

How may i get /var/log/dnf.log to log times in my system timezone?

How may i get /var/log/dnf.log to log times in my system timezone? Neither man dnf nor google have yet enlightened me on this. Centos8/rhel8.
gregrwm's user avatar
  • 71
3 votes
0 answers
389 views

How to check/set "kernel timezone" for use with iptables "time" module?

The iptables -m time module supports time-based firewall rules. By default it operates in UTC but with --kerneltz parameter it should work in "kernel timezone": $ iptables -m time --help ...
I-P-X's user avatar
  • 131
3 votes
3 answers
1k 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. ...
Manuel Jordan's user avatar
0 votes
1 answer
2k views

How to know when was the last time I changed the time zone?

I changed my time zone recently but can't recall which day. Is there a way to know what is the date that I changed my time zone?
malaki106's user avatar
0 votes
1 answer
466 views

Convert custom date format (GMT-08-2021.08.31-18.29.05) to epoch time

I have a date string that is supplied in the following format: Timezone-Year.Month.Day-Hour.Minute.Second GMT-08-2021.08.31-18.29.05 and I need to figure out how to get the date command to recognize ...
Harry Muscle's user avatar
  • 2,547
1 vote
1 answer
443 views

hwclock's output is effected by DST when entering it, but not when leaving it

I set system time and RTC to the following values. date -s 2021.08.30-09:59:30 >/dev/null 2>/dev/null //set system time hwclock -w //sync RTC to system time Also, /etc/TZ (which is the same ...
Andy Lin's user avatar
  • 121
0 votes
1 answer
1k views

/etc/localtime is not a symbolic link

According to localtime from Linux manual page: It should be an absolute or relative symbolic link pointing to /usr/share/zoneinfo/, followed by a timezone identifier such as "Europe/Berlin" ...
Andy Lin's user avatar
  • 121
0 votes
2 answers
1k views

How can I get the timezone of files and directories via terminal command?

For example, I create a file and directory in the timezone in New York. Then I change the timezone in the system to London (UK), but still want to know which file and directory is created in which ...
fui74dsf's user avatar
2 votes
2 answers
2k views

Date and time zone offset not working correctly

I'm facing a strange behavior of date command when using time zone offset on Solaris. >echo $TZ MET >date Wed Mar 31 11:41:45 MEST 2021 >TZ=MET+24 date Tue Mar 30 09:42:06 MET 2021 >TZ=...
storm's user avatar
  • 133
2 votes
1 answer
586 views

VFAT, Linux: Invalid file timestamps shown after a reboot

Just encountered a problem: when rebooting a Linux system, timestamps of all files in the mounted VFAT filesystem are shown in the incorrect timezone. It seems like a device starts thinking that its ...
vmlinuz's user avatar
  • 41
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 ...
Phantom's user avatar
  • 453
3 votes
1 answer
3k views

Understanding TZ(Time Zone) variable in Unix

I was trying to find older dates using TZ="GMT+NoOfHours" date. To my surprise, it was absolutely working as expected when NoOfHours >= 0 to NoOfHours <=167(returning date older by 1-7 ...
Abishek J's user avatar
  • 190
0 votes
2 answers
76 views

coreutils date does not return time zone when called from script

In terminal, the output of the lines TZ="Australia/Broken_Hill" date -d '2021-4-26 09:29' TZ="Australia/Broken_Hill" date -d '2021-4-26 09:29' +%Z is Mon Apr 26 09:29:00 AM ACST ...
Chris's user avatar
  • 3
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="...
Matt's user avatar
  • 561
0 votes
1 answer
75 views

Why do many Web sites miscalculate my current time?

I am using Debian. My clock shows the current time. I set the BIOS to Greenwich, but then the time is adjusted to the current time zone. But when I visit many Web sites, they think I'm visiting from a ...
Village's user avatar
  • 3,717

1
2 3 4 5