date: want to change UTC to local in the displayed system time.
Hi:
The problem: Code:
semoi@darkstar:~$ date Code:
semoi@darkstar:~$ date The attempted solution: The man page begins: Code:
SYNOPSIS But I can always mentally transform local time to UTC and use the second syntax to set the desired time. Only that still I have to make the date command to display the time as local time. These man pages are so concise! They seem written for a person already _very_ familiar with Linux. I do not say that they do not use a rigorous and technical language. But they should be written with any kind of reader in mind, not just the one who is an old linux user. Perhaps I'm dumb, but I say I have never got it with this damned date man page!@ EDIT: the date I can always set it, which is the most important part. If date gets it as if I am giving him UTC time, OK, I specify time, in the command line, as UTC time. From the point of view of filesystem maintainance this is all that matters. So, this post is not that important to me, I have just realized. |
|
It seems like you haven't set the correct timezone in the system please try
Code:
root@aya:~$ cp /usr/share/zoneinfo/Europe/London /etc/localtime Some distributions have other ways of setting this, just googling for "distroname how to set timezone" should do. Afterwards, it might be a good idea to run ntpdate to sync the time: Code:
root@aya:~$ ntpdate 0.pool.ntp.org |
As I said before, considering the system insisted displaying time (date command) as UTC time, I converted the local time to UTC and reset time to this time. The system would continue displaying UTC time now, but this would agree with local time. I mean, Buenos Aires is GMT - 3. When the time by my watch is 5am, date now displays 8 UTC which is correct. Of course, the point was I want to have the time displayed as local time.
But now, I am seeing something strange has happened: the time is being displayed, say 02:47:58 ART 2012 It was 'UTC' that was in the string printed before, not 'ART', that was what I wanted. And the time is correct. Honestly, I many times have a issue which is not some urgent problem I must fix, but a rather less utilitarian question. And people from LQ do not seem interested in answering theoretical questions. If I come with a very concrete problem, that's fine. But generalities seem to be always out of the order of the day. And I do not understand this attitude. Just commenting. Because if I'd now say that the real problem is that I cannot understand the date man page, somebody would ask: what do you want to do. I repeat it. That man page seems confusing and incomplete to me. Perhaps just a couple of clarifications would make me to understand the whole man page. And googling won't make the situation look better. They generally present you with a version of the same man page. Do not worry. I will, some of these days, devout my best effort to understand the date command usage and, by the way, will find the reason why it is so obscure to me now, or the kind of people that wrote that page. ntpdate I can't run it because when the installer ask for the services to run at startup, I said no to ntpdate. Plus, if ntpdate is running and I, for some reason, want to set the date manually, that can be, they told me in LQ, harmful to the system. |
All times are GMT -5. The time now is 01:44 PM. |