LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2008, 07:42 AM   #1
premnarayan
LQ Newbie
 
Registered: Jan 2008
Location: noida
Distribution: archlinux, slackware
Posts: 21

Rep: Reputation: 15
'date' always shows utc !


Hi,
I am using archlinux current and have run into this weird problem. I do not recall what I could have messed up... may be someone with good understanding of how the date command functions can help?
Here is the problem:
Code:
root@GeneX:~ # ls -l /etc/localtime 
lrwxrwxrwx 1 root root 33 2008-01-22 19:49 /etc/localtime -> /usr/share/zoneinfo/Asia/Calcutta
root@GeneX:~ # hwclock --hctosys --localtime
root@GeneX:~ # date
Wed Feb 13 18:02:52 UTC 2008
root@GeneX:~ # hwclock --hctosys --utc      
root@GeneX:~ # date
Wed Feb 13 18:03:01 UTC 2008
My timezone file is at place, yet i get date as UTC. Setting system time using hwclock with --utc or --localtime do not make any difference!

Any idea where is the problem?
 
Old 02-13-2008, 07:54 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
Is your TZ environment variable set, perhaps to UTC or something invalid?
 
Old 02-13-2008, 09:45 AM   #3
premnarayan
LQ Newbie
 
Registered: Jan 2008
Location: noida
Distribution: archlinux, slackware
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the reply Matir!
There was no TZ environment variable.
Even if I set it, there is no difference in the output of date and date -u.

---------
$ export TZ="Asia/Calcutta"
$ date
Wed Feb 13 20:10:56 Asia/Calcutta 2008
$ date -u
Wed Feb 13 20:11:06 UTC 2008
--------

My concern is that my /etc/localtime is not being used. My timezone is GMT+5:30, but i do not see date giving me two time outputs that differ by 5:30.
 
Old 02-14-2008, 10:43 PM   #4
premnarayan
LQ Newbie
 
Registered: Jan 2008
Location: noida
Distribution: archlinux, slackware
Posts: 21

Original Poster
Rep: Reputation: 15
Unhappy

I am surprised....
People do not have any suggestions for my case!!!
 
Old 05-28-2009, 12:01 PM   #5
Lagniappe
LQ Newbie
 
Registered: May 2009
Posts: 4

Rep: Reputation: 1
Know this is an old thread, but it turns up high in google searches for this problem... and it took me 30 minutes or so to work out and I'm not a newbie by any means...

Short form... the ln -sf from /usr/share/zoneinfo/xyz to /etc/localtime did not work for me on CentOS 5.2 or 5.3 ... however a cp of the same file did. Yes I know it makes no sense at all, but that's what worked for me. Might save others a headache or two.
 
1 members found this post helpful.
Old 04-10-2013, 09:41 PM   #6
romagnolo
Member
 
Registered: Jul 2009
Location: Montaletto
Distribution: Debian GNU/Linux
Posts: 107

Rep: Reputation: 5
I'm running the current debian testing (Wheezy) and it turns out that my timezone, Europe/Rome, does not work, forcing all the system to show UTC times.
Setting /etc/localtime to Europe/Berlin weirdly fixes my problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ndiswrapper shows hardware, but iwconfig shows no device ZST Linux - Hardware 6 04-20-2006 01:15 PM
qms-analog shows date of 1/1/1970 cwwilson721 Linux - Software 0 02-14-2006 04:00 AM
Cannot set time/date to other time zone than UTC (Kubuntu) jamangold Ubuntu 1 12-23-2005 06:42 PM
why does "ls -l" shows date as YYYY-mm-dd? joroxx Slackware - Installation 2 11-17-2004 11:44 PM
snmp staus shows it running but on trying MRTG, it shows public@ipaddr not giving res swati220781 Linux - Networking 3 07-08-2004 06:32 PM


All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration