Questions tagged [timezone]

When using or applying a TZ value.

Filter by
Sorted by
Tagged with
171
votes
3answers
656k views

Timezone setting in Linux [closed]

I'm setting the timezone to GMT+6 on my Linux machine by copying the zoneinfo file to /etc/localtime, but the date command is still showing the time as UTCtime-6. Can any one explain to me this ...
124
votes
6answers
194k views

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

I have a server running with the timezone 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 ...
35
votes
1answer
4k views

Error message “date: invalid date '2016-10-16'”

Today my clock was automatically adjusted to summer time, and a script from a crontab started failing. I had a look at what was happening, and the following error was being displayed, with LC_ALL=C: ...
27
votes
3answers
86k views

Changing timezone on Debian keeps Local Time in UTC

I'm trying to get programs to log in local time for my own sanity. I have updated my timezone with: dpkg-reconfigure tzdata But the result of that command is: Current default time zone: '...
26
votes
4answers
16k 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 ...
26
votes
4answers
43k views

How can I examine the contents of /etc/localtime?

What command(s) can I use to examine the contents of the timezone files, such as /etc/localtime or the files under /usr/share/zoneinfo/*?
20
votes
3answers
14k 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?
17
votes
3answers
15k views

How do I get the current time in a different time zone without changing system time? [duplicate]

I am trying to use 'date' to get the time in a different time zone, and failing. All the methods I've found on google involve changing the time zone on the system, but that is not what I want. Is ...
16
votes
6answers
11k views

How to add a custom timezone clock to an XFCE panel?

My local time is CET (Prague, EU), I also need to see UTC and, some times, MSK time. Can I add multiple clocks with different zones to a panel in XFCE? I know how to add multiple clocks, actually, but ...
14
votes
2answers
22k views

Can date format current time for GMT timezone? [duplicate]

When I run date +"%Y%m%d%H%M%S" I receive 20171225203309 here in CET time zone. Can I use date to obtain a the current time in the same format, but for timezone GMT?
13
votes
1answer
11k views

Cron job does not fire up after a timezone change

I've tried eliminating many of the common errors, ensuring that the PATHs are available for cron there is an endline at the end of crontab file the timezone is set-up by: cd /etc cp /usr/share/...
12
votes
1answer
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 ...
12
votes
2answers
4k 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 ...
11
votes
2answers
24k views

How to change the user timezone?

I know that (for example in Debian) one could use dpkg-reconfigure tzdata to change the timezone of the system but I am wondering how one could change the user timezone (if Linux/Unix supports such an ...
10
votes
2answers
13k 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....
10
votes
5answers
13k views

Change the time zone of a cronjob

I have a cronjob which is executes every day at 9:00 AM of UTC-Time. I'm in GMT+1 so it executes at 10:00 AM local time. When there is the timezone change (to daylight saving time, DST), the cronjob ...
9
votes
2answers
4k 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 ...
8
votes
1answer
2k views

Run an application with different TimeZone

I have an windows application (Under Wine) that only works when I change timezone to NewYork's TimeZone. with Any other zone it doesn't start!! So, Is it possible in Linux to run an application with ...
8
votes
2answers
5k views

Get current timezone as `Region/City`

Unfortunately timedatectl set-timezone doesn't update /etc/timezone. How do I get the current timezone as Region/City, eg, given: % timedatectl | grep zone Time zone: Asia/...
7
votes
3answers
11k views

Disable daylight saving time in Debian Linux

I do not want my system to use daylight saving time. root@ali-debserver:~# cat /etc/timezone Asia/Tehran root@ali-debserver:~# cat /etc/default/rcS # # /etc/default/rcS # # Default settings for the ...
7
votes
1answer
2k views

How to correct wrong time zone offset via zic timezone compiler

I have an iPod touch (2nd gen) running iOS 3.1.3 (since it won't perform well with iOS 4) and constant troubles with the clock setting itself one hour ahead of the actual time when I connect it to the ...
7
votes
2answers
5k views

setting a cronjob in IST time

I am trying to set a cronjob run in a different timezone. I've googled a lot and found editing /etc/default/cron is the way to go. But this file is deprecated and I see the following message, so I ...
6
votes
4answers
25k views

Configure localtime. dpkg-reconfigure tzdata

I'm using this to configure localtime: dpkg-reconfigure tzdata It is ncurses interface. I'm looking for the way to programming this. Is there true way without user ncurses interface? How to ...
6
votes
3answers
4k views

What else apart from /etc/localtime and $TZ affects `date`?

I have a fedora 20 installation with the clock set to UTC, and no TZ environment variable. Why the date command is outputting the date in the CET timezone (which by the way is my local timezone)? [...
6
votes
1answer
3k views

How do I show UTC time in the i3status bar?

In my ~/.i3status.conf I have order += "tztime local" order += "tztime utc" #... tztime local { format = "%Y-%-m-%d %I:%M:%S" } tztime utc { format = "%H:%M:%S" } but my status bar shows ...
6
votes
2answers
615 views

My crontab only likes five asterisks (timezone related?)

I have a problem with a user's crontab. Crontab refuses to run any job unless it's scheduled to run every minute (* * * * *). An soon as you edit the task to run, say, on minute 15 of every hour, it ...
5
votes
1answer
1k views

PST to PDT changes on April 1st instead of March 11 at 2:00am?

I got the complaint that PST time zone is one hour ahead for Washington in my embedded device. I'm using tz utility to setup the timezone. This is the Los Angeles time zone : 2018 Sun, Mar 11 at ...
5
votes
1answer
2k views

Querying the current time of a city from terminal

I have friends all over the globe and before calling them I need to know their current time. Is there an application in Linux where one can query a city (if exists) in terminal (something like this): ...
5
votes
2answers
20k views

How to get the timezone of a FTP server?

With lftp, when I do ls I get the listing of the files on the FTP server, with their date. However, the timezone is not displayed. On my local machine, I can do ls -l --time-style=full-iso to see ...
5
votes
1answer
485 views

How to change the timezone on CentOS 7?

Does anyone know how to change the timezone on CentOS 7?
5
votes
3answers
5k views

Is my BST time zone an hour behind?

My system (Gnome 3 on Debian Testing) is confused about the current time. When I run date the time is showing correctly but some applications are an hour behind the times. For instance, when I add an ...
5
votes
1answer
672 views

hg log timezone formatting

For hg, I can set formatting with --template key to output only date, like this: > hg log -l1 --template "{date(date, '%Y-%m-%d %H:%M:%S')}\n" 2016-10-07 10:22:41 I can use %z control to output ...
5
votes
1answer
6k views

Set environment variable (TZ) for all startup scripts and inittab

I'm working on an embedded Linux system and looking for a way to set the time zone for all processes. The question is: Is there any possibility to set the TZ environment variable at boot time (init ...
5
votes
1answer
2k views

How to make awesomewm textclock reflect timezone change?

I am using the awful.widget.textclock widget to display the time in Awesome WM on Arch Linux, and I am using a program called tzupdate to automatically update my system time according to geolocation ...
5
votes
0answers
903 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 Zone" ...
4
votes
5answers
8k views

How to make an Ubuntu time zone change stick?

I'd like to reset the timezone through editing /etc/timezone. However, after I was done editing and saved the file, the system time did not change accordingly. On the other hand, when I take ...
4
votes
2answers
4k views

/etc/shadow date of last password change—UTC or local time?

man 5 shadow gives the following description of the third field in each line: The date of the last password change, expressed as the number of days since Jan 1, 1970. The value 0 has a special ...
4
votes
2answers
100 views

How do I report an incorrect timezone?

Timezone information for Cayman Islands is incorrect. The Cayman Islands government toyed with the idea of changing the timezone to have daylight savings, in effect matching US/Eastern time, however ...
4
votes
1answer
28k views

Daylight saving option on Linux servers

My CentOS server is not updating showing correct time. I have set $ ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime Still I am on GMT. I do see the following entries in /etc/sysconfig/...
4
votes
4answers
6k views

Get current timezone on CentOS 7?

On previous version of CentOS, I used the following command to get the current timezone in my bash script: timezone=$(sed 's/ZONE=//g' /etc/sysconfig/clock) Output is "America/New_York" How can I ...
4
votes
2answers
792 views

How to get time synced outputs (different timezones on servers)?

So imagine there are ~100 servers with different timezones (not all diff., but many-many timezones). There are outputs on the server logs like: server1:BFE4C025 0420201413 P H sysplanar0 ...
4
votes
1answer
2k views

bash terminal [\t] (time) is not same timezone as 'date'

In my .bashrc file I configured how I would like my prompt to be displayed. My .bashrc is sourced in .bash_profile. The command in the .bashrc file is: PS1='[\t] \u@\h is $PWD :: ' I switched the ...
4
votes
1answer
10k views

How to have time synchronization work on localtime?

The Arch wiki suggests Time standard Recommended: Set both Arch Linux and Windows to use UTC, following Time#UTC in Windows. Also, be sure to prevent Windows from synchronizing the time ...
4
votes
2answers
404 views

Causing fluxbox to show a different time then the default timezone

I've moved to fluxbox as my default environment on our corporate environment. I obviously can't change the time on the machine. But I'd like the clock to show my local time instead of the machine's ...
4
votes
2answers
3k views

Russian timezone is not up-to-date

I have noticed, that the Russian timezone is not up-to-date. The GMT offset is set to +3 h now, whereas the current GMT offset is +4 hours. Could someone tell me how can i manually edit the tzdata ...
4
votes
1answer
11k views

Why does `date` show UTC time, even with a different timezone set?

I'm running Raspbian on a Pi 2. While I'm not sure this behavior was different previously, running date outputs the same time as date -u, despite my timezone being UTC-7. Below is the output of both ...
4
votes
1answer
7k views

PlayOnLinux error on application when I change my timezone

I have a game (scrolls.com) that I'm running under wine. Everything was OK, until I moved and changed my timezone. Now, if I keep my old timezone it works. But if I change the timezone to something ...
4
votes
1answer
67 views

I have three different timezones on my Debian Linux

I use Debian 9.5.1. I used the dpkg-reconfigure tzdata command to set my timezone to Tehran. Now I have three timezones in my Linux. I execute the following three command together and look at logs: ...
4
votes
2answers
846 views

Setting timezone globally for OpenIndiana Hipster?

What is the correct way of setting the timezone (CentralEuropeanTime... or now rather CET with Daylight Savings Time) on the latest version of OpenIndiana Hipster? I've tried a changing a few ...
3
votes
3answers
1k views

Linux: Set timezone offset that doesn't exist?

Is it possible on any Linux to force a timezone offset that is outside the "valid" range -12 to +14? I'm looking for a way to temporarily simulate a "local time" (for testing purposes) that might be ...