Questions tagged [timezone]
When using or applying a TZ value.
224
questions
3
votes
1
answer
215
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=...
1
vote
1
answer
24
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 ...
0
votes
1
answer
15
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 ...
1
vote
1
answer
420
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
0
answers
76
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
1
answer
138
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 ...
0
votes
0
answers
43
views
Is it normal for timezone to symlink to posixrules?
I'm trying to diagnose an ftp issue (see here: Copying files from remote to local using lftp in unix if you are interested).
While investigating I noticed something about my timezone settings. lftp is ...
0
votes
0
answers
38
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 ...
6
votes
1
answer
517
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 ...
0
votes
1
answer
38
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.
2
votes
0
answers
75
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
...
0
votes
0
answers
14
views
How to sanitize user input timezone (TZ)?
In my POSIX sh script, I receive a user input timezone (=TZ) with an option. However, I want to throw errors when the tz is not legit (not found in the system).
For example, TZ='CETX' date '+%T' ...
0
votes
2
answers
90
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.
...
0
votes
1
answer
171
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?
0
votes
1
answer
104
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 ...
1
vote
1
answer
86
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 ...
0
votes
1
answer
163
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" ...
0
votes
0
answers
48
views
log4j logging timezone
We are using cloudera CDP 7.1.6 which uses log4j for all of it's logging.
All of the different ecosystem tools, spark/oozie/solr/hdfs etc, have their own log4j.properties file, i.e. oozie-log4j....
0
votes
2
answers
154
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 ...
1
vote
2
answers
560
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=...
2
votes
1
answer
204
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 ...
0
votes
0
answers
141
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 ...
2
votes
1
answer
343
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 ...
0
votes
2
answers
23
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 ...
1
vote
1
answer
382
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="...
0
votes
1
answer
52
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 ...
0
votes
1
answer
80
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&...
1
vote
1
answer
2k
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 '...
1
vote
1
answer
800
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
...
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 ...
-3
votes
1
answer
42
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?
2
votes
1
answer
8k
views
My local time is in the correct timezone, but isn't actually the real local time here
I have a machine that dual boots Kali Linux and Windows.
The correct local time when I ran my tests was 11:19 IST (India Standard Time), which is of course 05:49 UTC.
As you can see from the edit ...
0
votes
1
answer
303
views
How to get +HHMM offset of TZ="Asia/Tokyo" compared to current time-zone using bash?
I am taking input for TZ and I want to convert it into a (+/-)HHMM format.
but not compared with UTC, I want it to be compared with the local time.
How can I do it?
0
votes
1
answer
115
views
How to fetch correct UTC in system
Did a fresh Fedora 32 install by erasing existing Windows 10 Pro installation completely(No dual boot here). After installation, the display time is acting weird.
My local timezone is IST. That is, +5:...
1
vote
1
answer
216
views
Is there any way to configure my system to display different timezone clocks together at the same time on Linux?
Is there any way to configure my system to show different timezone clocks together at the same time on Linux? I am about to enroll to online courses substitutes classes from the usual in-person ...
1
vote
3
answers
1k
views
Timestmap of a SFTP-delivered file
I run a SSH server (a plain sshd) which receives files from multiple users in different timezones/DSTs via SFTP. These files are then polled and further processed by a set of worker jobs.
In order to ...
1
vote
2
answers
201
views
Is it planned to incorporate the Olson database for TZ in POSIX for `date`?
There is a simpler way to define the value of the timezone, the Olson database.
It has been supported for 19 years (Paul Eggert) by Solaris, HP-UX and Tru64.
It is certainly supported by AIX as the ...
0
votes
2
answers
225
views
"date" command doesn't show many timezones on Centos 8
On a fresh Centos 8 system, the date command does not show many timezones even though the timezone is properly set by timedatectl and /etc/localtime points to the correct TZ data file.
For example:
#...
0
votes
1
answer
157
views
date tz converts with GMT and City Names with same GMT get differ result
I want convert custom string time on UTC between different time zones defined as GMT.
I general all answers that is here ok.
But some question is with this examples:
1.TZ='GMT-07' date --date='TZ="...
0
votes
1
answer
665
views
Ubuntu changing clock adjustment on Windows 10 in dual-boot system
I got a dual boot desktop with both Ubuntu 18.04LTS and Windows 10. My Win10 time zone and hh:mm settings are automatically synchronized with the server. Somehow, whenever I boot into Ubuntu it does ...
0
votes
1
answer
1k
views
Are file modification times in UTC or in the local time zone?
If I touch a new file, I see that its modification time is showing as the current time in my local time-zone rather than in UTC. If I were to copy that file to a machine that's in another time-zone, ...
0
votes
0
answers
85
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
2
answers
200
views
Set time zone in bash file
I run a Matlab script main.m in the HPC of my university.
To run the script I qsub in the terminal the following bash file
#$ -S /bin/bash
#$ -l h_vmem=5G
#$ -l tmem=5G
#$ -l h_rt=360:0:0
#$ -cwd
#$ ...
0
votes
1
answer
492
views
Xfce: set time language to other than that of the system (interface)
I want o have English for my system interface and settings, but French for locale (region), including time (weekdays, months, which appear in conky etc).
But in Xfce the time language is set along ...
0
votes
1
answer
107
views
Does the system need to be at the right hour in order to get a GPS fix
I am using an ARM device on which Debian is installed. A GPS chip is installed on the machine and I use it in my program.
That being said, it seems extremely, long, or sometimes impossible to even ...
1
vote
4
answers
519
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
0
answers
102
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
...
1
vote
1
answer
3k
views
How to synchronize timezone in Docker containers
I've some issues to have similar timezone in all containers of a docker-compose stack.
I tried to add TZ=Europe/Paris as environment variable to containers, and also tried to use :
volumes:
-v /...
1
vote
0
answers
80
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. ...
12
votes
1
answer
2k
views
How does `at` know there will be a time change?
I happened to be twiddling around with at just yesterday at 2:40 AM. (Don't ask...) I tried scheduling events one minute in the future (as a test), and – it just didn't happen. The events were in the ...