Questions tagged [timezone]
When using or applying a TZ value.
43
questions with no upvoted or accepted answers
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 ...
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 ...
3
votes
0
answers
399
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
...
3
votes
1
answer
198
views
Time zone: Host. What does that mean?
I know that there is several ways to setup system timezone on CentOS host.
What I would like to know is the meaning of this Host timezone which seems to be set by default and is reported by ...
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
...
3
votes
1
answer
698
views
How to convert POSIX time to Olson timezone file?
I have localzone in POSIX format.
"PDT,M3.2.0/02:00,M11.1.0/02:00"
How to create my own timezone file with zic tool?
I took an example from man.
rule.infile contains:
Rule USA 1970 max ...
2
votes
0
answers
317
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-...
2
votes
0
answers
142
views
2038 problem behaving differently in different time zone
I am working on 32 bit linux and i understand 2038 problem
https://en.wikipedia.org/wiki/Year_2038_problem
Anyhow , when i try to use date command to set time beyond 03:14:07 UTC on 19 January 2038
...
2
votes
0
answers
2k
views
"export TZ=`date +%Z`" leads to confusing output of "date"
I recently noticed the following (strange) behavior:
user@pc:~$ date
Mi 21. Jun 12:03:10 CEST 2017
user@pc:~$ date +%Z
CEST
user@pc:~$ export TZ=`date +%Z`
user@pc:~$ date
Mi 21. Jun 10:03:30 ...
2
votes
1
answer
843
views
Difference between localtime and clock
/etc/localtime is a symlink.
/etc/sysconfig/clock is a config file.
Q: What is the difference between them? Each could store timezone setting.
Using SLES.
2
votes
0
answers
10k
views
How do I set the correct time on Centos 7?
I have the minimal install of Centos 7 on my PC (not virtual box). I have spent the last few hours trying to figure out how to set up the correct time. I am still fast by one hour. After spending ...
2
votes
0
answers
5k
views
Linux set hardware clock in UTC and system time in local time
Due to some reasons, I have to remotely set hardware clock time in UTC and system time in local time. My OS is OpenSUSE 13.1 and my tool is only the hwclock command. What I do so far:
1. Synchronize ...
2
votes
0
answers
715
views
Gnome clock on UTC, not local
My OS is Gentoo. My Hardware Clock is set to UTC. The date command returns the correct time and timezone (EDT). However, my GNOME clock is set to UTC. I have 2 clocks, one at Internet Time, and one ...
1
vote
1
answer
306
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 ...
1
vote
0
answers
143
views
Secure way to update Date & Time of a Linux Embedded Device
I have a Linux (4.9.171) machine running on ARM Cortex-A processor. The system has internet connection and talks to my server over SSL. At the first boot, I can configure the date and time to it. ...
1
vote
0
answers
507
views
Get sunset and sunrise times from GNOME night-mode
GNOME has a night-mode feature that automatically makes the screen a bit more reddish after the sunset, till the sunrise.
Both sunset and sunrise times can be fetched automatically from - I assume - ...
1
vote
0
answers
170
views
RHEL GUI offers Automatic Time Zone Option. Is there a way to set that option from console?
As you can see the Automatic Time zone is off in GUI.
Is there a command to set it on?
Example: if Automatic Date and Time is selected to be off from GUI, it can be changed from console with:
...
1
vote
1
answer
664
views
/etc/timezone on Amazon Linux
Usually /etc/timezone is a text file containing the timezone, at least that's how it works on most non-embedded linux distros. However, on Amazon Linux(4.14.72-68.55.amzn1.x86_64) it's actually an ...
1
vote
1
answer
626
views
Updating Olson timezone database in a running system
Is it possible to update an Olson timezone database without stopping the current running systems?
I think that the renaming of folders and files of the or inside the zoneinfo folder can't accomplish ...
1
vote
0
answers
147
views
Trigger some action on system clock change?
I would like to have something occur - say, I would like to run a certain script - whenever the system clock is adjusted (hardware clock and/or offset from hardware clock, including the timezone). ...
1
vote
1
answer
1k
views
Permanently adjusting RHEL 6 timezone
We have a collection of cards running RHEL 6. We would like them to boot such that their timezones are Zulu (UTS, GMT, GMT-0). I have read and tried many of the suggestions out there that supposedly ...
1
vote
0
answers
508
views
touch is creating files one hour behind the current time. How to set it with current time?
All ordinary users on my linux box have an issue. When they create a file using $ touch test.txt or using script and do ls -ali | grep test.txt I notice that the time of the file is one hour behind ...
1
vote
0
answers
852
views
How to change last modification date and time, regardless of timezone and DST?
I have two files and I need to change their last modification date: both should be midnight, one on 25th June and the other one on 25th November. Basically, this:
touch -cmt 201606242359.60 summer-...
1
vote
0
answers
132
views
Problem with MySQL timezone
I have installed MySQL,version 5.6.16.My OS is FreeBSD,version is 9.3.MySQL installed on jail.When I check date I see Thu Nov 17 15:22:14 AMT 2016,I see this output also on the system.In MySQL,when I ...
1
vote
0
answers
2k
views
Linux embedded: change time zone
I'm working on an embedded system with linux. I'm trying to change the timezone used by the operating system and I'm doing this by copying the timezone file from /usr/share/zoneinfo to /etc/localtime (...
0
votes
1
answer
61
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 ...
0
votes
0
answers
50
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 ...
0
votes
0
answers
27
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
...
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,...
0
votes
0
answers
551
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 ...
0
votes
1
answer
167
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 ...
0
votes
0
answers
942
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, ...
0
votes
0
answers
178
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 ...
0
votes
1
answer
2k
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 ...
0
votes
0
answers
328
views
Get data from POSIX timezone files?
IE: I'm on Ubuntu 18.04 And looking at /usr/share/zoneinfo, But all the files seem to be written with binary, I would like to get the actual information from the file so any help is greatly ...
0
votes
0
answers
207
views
How to set half hour and 45-minute time zones without worrying about DST changes in Linux?
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/...
0
votes
1
answer
2k
views
system-wide timezone question -red hat enterprise 7
For my user account I explicitly export the TZ variable to be america/chicago in my .bash_profile file, so when I type: date, I get the date in CST. However I have not set the TZ variable for any ...
0
votes
0
answers
81
views
difference between timezone in ssh and in php?
why i have difference between timezone in ssh and php
$ TZ=Africa/Khartoum date
print :
Mon Apr 30 13:40:41 CAT 2018
but in php
date_default_timezone_set('Africa/Khartoum');
echo date('D M d Y ...
0
votes
1
answer
913
views
AIX: Why does the timezone differ when using su or in crontab?
3:root@SERVER:/root # cat wtf.sh
echo "date"
date
echo "su - root -c date"
su - root -c date
3:root@SERVER:/root #
3:root@SERVER:/root # ksh wtf.sh
date
Wed Nov 9 13:15:01 MEZ 2016
su - root -c ...
0
votes
0
answers
779
views
TIMEZONE set for specific country but we get UTC Time - how it can be?
I have Linux red-hat 6.6 version
This machine was set for Israel time zone as the following
# more /etc/sysconfig/clock
ZONE="Israel"
ls -ltr /etc/localtime
lrwxrwxrwx 1 root root 23 Jul ...
0
votes
0
answers
686
views
Reset time / date to current time-zone using timedatectl preferably, or date
I'm looking to reset the current system time to the selected time-zone using the timedatectl preferably, or date command. This is on the CentOS 7 OS, hence the timedatectl preference.
I'm in need of ...
0
votes
1
answer
1k
views
Custom Linux Timezone
I believe rdesktop 1.7.1 is sending Linux timezones (For example "EST") to the Windows client I regularly connect to (I am yet to find a way of seeing what Windows receives in the way of RDP settings ...
0
votes
2
answers
2k
views
Timezone doesn't change after update to Asia/Tehran in CentOS 6.6
I want to change the server timezone and used the following commands:
cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Tehran /etc/localtime
but when I check the ...