Questions tagged [timezone]

When using or applying a TZ value.

Filter by
Sorted by
Tagged with
0 votes
2 answers
44 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
36 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
80 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
27 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
54 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
57 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,452
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
101 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
308 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
  • 23
2 votes
0 answers
116 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
  • 380
4 votes
3 answers
543 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
125 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
6k 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
358 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
0 votes
3 answers
5k 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
  • 117
0 votes
1 answer
140 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
  • 131
1 vote
1 answer
556 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
193 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
982 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
25 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
606 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
1 vote
2 answers
9k 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?
FFmpegEnthusiast's user avatar
3 votes
1 answer
496 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,710
1 vote
1 answer
239 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
114 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
9k 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.1k
0 votes
0 answers
745 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
0 votes
1 answer
3k 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
0 votes
0 answers
152 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,133
6 votes
1 answer
2k 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
262 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
293 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
1k 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
404 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,477
1 vote
1 answer
353 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
802 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
489 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
  • 413
2 votes
1 answer
2k 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
  • 170
0 votes
2 answers
73 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
69 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
  • 4,835
0 votes
1 answer
158 views

How to conceal my timezone in the Date entry of the headers of email messages in Mutt (NeoMutt)?

Because of privacy concerns I'd like to not expose my timezone when sending a message. When I look at locally-stored message they look something like the following: Return-Path: <my email address&...
Gark Garcia's user avatar
1 vote
1 answer
5k views

Not able to set time zone on ArchLinux

I would like to set my timezone to Asia/Kolkata. Here is the error I see on using timedatectl: $ sudo timedatectl set-timezone Asia/Kolkata Failed to set time zone: Invalid or not installed time zone '...
babon's user avatar
  • 153
1 vote
1 answer
1k views

Convert Unix timestamp in PST to IST

I am trying to convert any Unix epoch time value into IST timezone. Unix date: date -d@1509872957 gives Sun Nov 5 01:09:17 PST 2017 for UTC: date -d@1509872957 -u gives Sun Nov 5 09:09:17 UTC 2017 ...
Sowmya's user avatar
  • 11
27 votes
1 answer
2k views

Why is `TZ=Asia/Kolkata date --date="1/1/1906"` invalid?

When I run: TZ=Asia/Kolkata date --date="1/1/1906" I get: date: invalid date ‘1/1/1906’ Here I can find a good article on that: Calcutta Time But the confusion also comes from the fact ...
15 Volts's user avatar
  • 2,009
-2 votes
1 answer
66 views

Timezone: Why would someone want to set their system timezone as different from the real one?

For example, a computer in USA with a system timezone of Arctic/Longyearbyen... What benefits does it have, if any? Also, what are the potential disadvantages of doing so?
computronium's user avatar

1
2 3 4 5