public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] system time 6-hr. ahead
@ 2013-05-11  5:25 Joseph
  2013-05-11  5:31 ` Joseph
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joseph @ 2013-05-11  5:25 UTC (permalink / raw
  To: gentoo-user

My computer time reported by asterisk server or php database is 6hr ahead.
Why?

My desktop clock is correct, and command line "date" reporting local time as well.
My /etc/conf.d/hwclock
clock="local"
clock_hctosys="YES"
clock_systohc="YES"

Should I set clock="UTC"? 
I'm running Windows via VirtualBox and I know windows is using "local" time.

-- 
Joseph


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] system time 6-hr. ahead
  2013-05-11  5:25 [gentoo-user] system time 6-hr. ahead Joseph
@ 2013-05-11  5:31 ` Joseph
  2013-05-11  6:00   ` Manuel McLure
  2013-05-11  6:56 ` [gentoo-user] " Nikos Chantziaras
  2013-05-11  8:58 ` [gentoo-user] " Wang Xuerui
  2 siblings, 1 reply; 9+ messages in thread
From: Joseph @ 2013-05-11  5:31 UTC (permalink / raw
  To: gentoo-user

On 05/10/13 23:25, Joseph wrote:
>My computer time reported by asterisk server or php database is 6hr ahead.
>Why?
>
>My desktop clock is correct, and command line "date" reporting local time as well.
>My /etc/conf.d/hwclock
>clock="local"
>clock_hctosys="YES"
>clock_systohc="YES"
>
>Should I set clock="UTC"?
>I'm running Windows via VirtualBox and I know windows is using "local" time.

I forgot to mention:
/etc/timezone
Canada/Mountain 

-- 
Joseph


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] system time 6-hr. ahead
  2013-05-11  5:31 ` Joseph
@ 2013-05-11  6:00   ` Manuel McLure
  2013-05-11  6:27     ` Joseph
  2013-05-12  5:01     ` Joseph
  0 siblings, 2 replies; 9+ messages in thread
From: Manuel McLure @ 2013-05-11  6:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

For PHP you need to set the date.timezone variable in the php.ini file -
that should fix things. For asterisk I have no clue.


On Fri, May 10, 2013 at 10:31 PM, Joseph <syscon780@gmail.com> wrote:

> On 05/10/13 23:25, Joseph wrote:
>
>> My computer time reported by asterisk server or php database is 6hr ahead.
>> Why?
>>
>> My desktop clock is correct, and command line "date" reporting local time
>> as well.
>> My /etc/conf.d/hwclock
>> clock="local"
>> clock_hctosys="YES"
>> clock_systohc="YES"
>>
>> Should I set clock="UTC"?
>> I'm running Windows via VirtualBox and I know windows is using "local"
>> time.
>>
>
> I forgot to mention:
> /etc/timezone
> Canada/Mountain
> --
> Joseph
>
>


-- 
Manuel A. McLure WW1FA <manuel@mclure.org> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.                       -- H.P. Lovecraft

[-- Attachment #2: Type: text/html, Size: 1615 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] system time 6-hr. ahead
  2013-05-11  6:00   ` Manuel McLure
@ 2013-05-11  6:27     ` Joseph
  2013-05-12  5:01     ` Joseph
  1 sibling, 0 replies; 9+ messages in thread
From: Joseph @ 2013-05-11  6:27 UTC (permalink / raw
  To: gentoo-user

On 05/10/13 23:00, Manuel McLure wrote:
>   For PHP you need to set the date.timezone variable in the php.ini file
>   - that should fix things. For asterisk I have no clue.
>

When I set in: /etc/conf.d/hwclock
clock="UTC" 
my server php and asterisk reporting correct clock setting by on my desktop is reporting 6hr behind.
so is "date" 6hr behind.

I've tried to set localtime in .bashrc
TZ="Canada/Mountain"

log OUT / log IN but it didn't make any difference. The desktop XFCE clock is 6hr behind.

-- 
Joseph


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: system time 6-hr. ahead
  2013-05-11  5:25 [gentoo-user] system time 6-hr. ahead Joseph
  2013-05-11  5:31 ` Joseph
@ 2013-05-11  6:56 ` Nikos Chantziaras
  2013-05-11 14:23   ` Joseph
  2013-05-11  8:58 ` [gentoo-user] " Wang Xuerui
  2 siblings, 1 reply; 9+ messages in thread
From: Nikos Chantziaras @ 2013-05-11  6:56 UTC (permalink / raw
  To: gentoo-user

On 11/05/13 08:25, Joseph wrote:
> My computer time reported by asterisk server or php database is 6hr ahead.
> Why?
>
> My desktop clock is correct, and command line "date" reporting local
> time as well.
> My /etc/conf.d/hwclock
> clock="local"
> clock_hctosys="YES"
> clock_systohc="YES"
>
> Should I set clock="UTC"? I'm running Windows via VirtualBox and I know
> windows is using "local" time.

Try setting Windows to use UTC time instead:

http://crashmag.net/configuring-windows-7-support-for-utc-bios-time

It's what I use here for years and never had a problem with it.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] system time 6-hr. ahead
  2013-05-11  5:25 [gentoo-user] system time 6-hr. ahead Joseph
  2013-05-11  5:31 ` Joseph
  2013-05-11  6:56 ` [gentoo-user] " Nikos Chantziaras
@ 2013-05-11  8:58 ` Wang Xuerui
  2 siblings, 0 replies; 9+ messages in thread
From: Wang Xuerui @ 2013-05-11  8:58 UTC (permalink / raw
  To: gentoo-user

2013/5/11 Joseph <syscon780@gmail.com>:
> My computer time reported by asterisk server or php database is 6hr ahead.
> Why?
>
> My desktop clock is correct, and command line "date" reporting local time as
> well.
> My /etc/conf.d/hwclock
> clock="local"
> clock_hctosys="YES"
> clock_systohc="YES"
>
> Should I set clock="UTC"? I'm running Windows via VirtualBox and I know
> windows is using "local" time.


You can make Windows use UTC by editing registry:
http://superuser.com/questions/185773/does-windows-7-support-utc-as-bios-time

However, do note that Windows would NOT update the hardware clock if
this is done. So make sure Linux would properly set the HW clock at
shutdown or your clock may drift over time.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Re: system time 6-hr. ahead
  2013-05-11  6:56 ` [gentoo-user] " Nikos Chantziaras
@ 2013-05-11 14:23   ` Joseph
  2013-05-11 19:29     ` Nikos Chantziaras
  0 siblings, 1 reply; 9+ messages in thread
From: Joseph @ 2013-05-11 14:23 UTC (permalink / raw
  To: gentoo-user

On 05/11/13 09:56, Nikos Chantziaras wrote:
>On 11/05/13 08:25, Joseph wrote:
>> My computer time reported by asterisk server or php database is 6hr ahead.
>> Why?
>>
>> My desktop clock is correct, and command line "date" reporting local
>> time as well.
>> My /etc/conf.d/hwclock
>> clock="local"
>> clock_hctosys="YES"
>> clock_systohc="YES"
>>
>> Should I set clock="UTC"? I'm running Windows via VirtualBox and I know
>> windows is using "local" time.
>
>Try setting Windows to use UTC time instead:
>
>http://crashmag.net/configuring-windows-7-support-for-utc-bios-time
>
>It's what I use here for years and never had a problem with it.

I set: clock="UTC"
Everything would work OK if I was able to set via user home directory ".bash_profile"
TZ="Canada/Mountain"

but this is not helping, my desktop time is still behind 6hr. (server programs are showing correct time though).
Do I need to run an additional command after updating user  ".bash_profile"?
I just log OUT/IN but it is not reflecting my time zone.

-- 
Joseph


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: system time 6-hr. ahead
  2013-05-11 14:23   ` Joseph
@ 2013-05-11 19:29     ` Nikos Chantziaras
  0 siblings, 0 replies; 9+ messages in thread
From: Nikos Chantziaras @ 2013-05-11 19:29 UTC (permalink / raw
  To: gentoo-user

On 11/05/13 17:23, Joseph wrote:
> On 05/11/13 09:56, Nikos Chantziaras wrote:
>> On 11/05/13 08:25, Joseph wrote:
>>> My computer time reported by asterisk server or php database is 6hr
>>> ahead.
>>> Why?
>>>
>>> My desktop clock is correct, and command line "date" reporting local
>>> time as well.
>>> My /etc/conf.d/hwclock
>>> clock="local"
>>> clock_hctosys="YES"
>>> clock_systohc="YES"
>>>
>>> Should I set clock="UTC"? I'm running Windows via VirtualBox and I know
>>> windows is using "local" time.
>>
>> Try setting Windows to use UTC time instead:
>>
>> http://crashmag.net/configuring-windows-7-support-for-utc-bios-time
>>
>> It's what I use here for years and never had a problem with it.
>
> I set: clock="UTC"
> Everything would work OK if I was able to set via user home directory
> ".bash_profile"
> TZ="Canada/Mountain"
>
> but this is not helping, my desktop time is still behind 6hr. (server
> programs are showing correct time though).
> Do I need to run an additional command after updating user
> ".bash_profile"?
> I just log OUT/IN but it is not reflecting my time zone.

The link I posted was about setting Windows to UTC time, not Linux.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] system time 6-hr. ahead
  2013-05-11  6:00   ` Manuel McLure
  2013-05-11  6:27     ` Joseph
@ 2013-05-12  5:01     ` Joseph
  1 sibling, 0 replies; 9+ messages in thread
From: Joseph @ 2013-05-12  5:01 UTC (permalink / raw
  To: gentoo-user

On 05/10/13 23:00, Manuel McLure wrote:
>   For PHP you need to set the date.timezone variable in the php.ini file
>   - that should fix things. For asterisk I have no clue.

Yes, you are correct.
In php time zone setting:

/etc/php/apache2-php5.4/php.ini
...
date.timezone = Canada/Mountain

In asteriks:
cdr.conf
...
[csv]
;usegmtime=yes    ; log date/time in GMT.  Default is "no"

--
Joseph


>   On Fri, May 10, 2013 at 10:31 PM, Joseph <[1]syscon780@gmail.com>
>   wrote:
>
>     On 05/10/13 23:25, Joseph wrote:
>
>     My computer time reported by asterisk server or php database is 6hr
>     ahead.
>     Why?
>     My desktop clock is correct, and command line "date" reporting local
>     time as well.
>     My /etc/conf.d/hwclock
>     clock="local"
>     clock_hctosys="YES"
>     clock_systohc="YES"
>     Should I set clock="UTC"?
>     I'm running Windows via VirtualBox and I know windows is using
>     "local" time.
>
>     I forgot to mention:
>     /etc/timezone
>     Canada/Mountain
>     --
>     Joseph



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-12  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11  5:25 [gentoo-user] system time 6-hr. ahead Joseph
2013-05-11  5:31 ` Joseph
2013-05-11  6:00   ` Manuel McLure
2013-05-11  6:27     ` Joseph
2013-05-12  5:01     ` Joseph
2013-05-11  6:56 ` [gentoo-user] " Nikos Chantziaras
2013-05-11 14:23   ` Joseph
2013-05-11 19:29     ` Nikos Chantziaras
2013-05-11  8:58 ` [gentoo-user] " Wang Xuerui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox