Re: [asterisk-users] wrong time retrieved from system command

2011-03-23 Thread Kevin Keane
Tilghman,

Could you remove your Reply-By header, please? Your deadline is two months in 
the past (and in any case, list postings really shouldn't have a reply deadline 
at all)

Here is your Reply-By header from your March 21 email:

Reply-By: Wed, 19 Jan 2011 16:20:00 -0600

Thanks!

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tilghman Lesher
Sent: Monday, March 21, 2011 3:54 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] wrong time retrieved from system command

On Monday 21 March 2011 06:45:37 asterisk asterisk wrote:
> ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
> 
> I use the above command to get the system date and time
> 
> it returns 20110321-034329
> 
> but it is exactly 8 hours early than the system time when I type date 
> in linux terminal
> 
> Mon Mar 21 19:43:35 HKT 2011
> 
> I am looking for help.

Do you have an file (or symlink) in /usr/share/zoneinfo called "GMT+8"?  I 
certainly don't, and I'm not running anything different from the standard set 
of zone files.  If you don't have that entry, then the timezone code will use 
UTC (i.e. no local differentiations).

--
Tilghman

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Tilghman Lesher
On Monday 21 March 2011 06:45:37 asterisk asterisk wrote:
> ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
> 
> I use the above command to get the system date and time
> 
> it returns 20110321-034329
> 
> but it is exactly 8 hours early than the system time when I type date in
> linux terminal
> 
> Mon Mar 21 19:43:35 HKT 2011
> 
> I am looking for help.

Do you have an file (or symlink) in /usr/share/zoneinfo called "GMT+8"?  I
certainly don't, and I'm not running anything different from the standard
set of zone files.  If you don't have that entry, then the timezone code
will use UTC (i.e. no local differentiations).

-- 
Tilghman

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread asterisk asterisk
Thanks,

You give me the right answer.

On Mon, Mar 21, 2011 at 10:19 PM, Barry Miller
wrote:

> On Mon, Mar 21, 2011 at 07:45:37PM +0800, asterisk asterisk wrote:
> > ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
> >
> > I use the above command to get the system date and time
> >
> > it returns 20110321-034329
> >
> > but it is exactly 8 hours early than the system time when I type date in
> > linux terminal
> >
> > Mon Mar 21 19:43:35 HKT 2011
>
> Have you tried "${STRFTIME(${EPOCH},Hongkong,%G%m%d-%H%M%S)}" ?
>
> $ date ; TZ=UTC date ; TZ=Hongkong date
> Mon Mar 21 10:13:31 EDT 2011
> Mon Mar 21 14:13:31 UTC 2011
> Mon Mar 21 22:13:31 HKT 2011
>
> --
> Barry
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>   http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Barry Miller
On Mon, Mar 21, 2011 at 07:45:37PM +0800, asterisk asterisk wrote:
> ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
> 
> I use the above command to get the system date and time
> 
> it returns 20110321-034329
> 
> but it is exactly 8 hours early than the system time when I type date in
> linux terminal
> 
> Mon Mar 21 19:43:35 HKT 2011

Have you tried "${STRFTIME(${EPOCH},Hongkong,%G%m%d-%H%M%S)}" ?

$ date ; TZ=UTC date ; TZ=Hongkong date
Mon Mar 21 10:13:31 EDT 2011
Mon Mar 21 14:13:31 UTC 2011
Mon Mar 21 22:13:31 HKT 2011

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread asterisk asterisk
With gmt+8, the result is

-Mon Mar 21 13:47:59 2011

For linux server timezone I set it via webmin and /etc/localtime is my
timezone file i.e. HK at GMT+8


On Mon, Mar 21, 2011 at 9:36 PM, Tzafrir Cohen wrote:

> On Mon, Mar 21, 2011 at 09:23:29PM +0800, aster...@ck-lee.com wrote:
> > The timezone is correct. I have double checked.
>
> How did you check it? What did you check, specifically?
>
> --
>   Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>   http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Tzafrir Cohen
On Mon, Mar 21, 2011 at 09:23:29PM +0800, aster...@ck-lee.com wrote:
> The timezone is correct. I have double checked.

How did you check it? What did you check, specifically?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread aster...@ck-lee.com
The timezone is correct. I have double checked.

From CK Lee 李卓廣

On 21 Mar, 2011, at 9:10 PM, Doug Lytle  wrote:

> aster...@ck-lee.com wrote:
>> It is about the same.
>>   
> 
> Then my guess is that the machine's timezone is incorrect.
> 
> Doug
> 
> 
> -- 
> 
> Ben Franklin quote:
> 
> "Those who would give up Essential Liberty to purchase a little Temporary 
> Safety, deserve neither Liberty nor Safety."
> 
> 
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>  http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Doug Lytle

aster...@ck-lee.com wrote:

It is about the same.
   


Then my guess is that the machine's timezone is incorrect.

Doug


--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety."


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Doug Lytle

asterisk asterisk wrote:

${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}

I use the above command to get the system date and time


I don't specify timezone when I'm working with EPOCH, what happens when 
you remove it?


Doug


--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety."


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Ishfaq Malik
what do you get when you do

${STRFTIME(${EPOCH},,%G%m%d-%H%M%S)}

?

Ish

On Mon, 2011-03-21 at 19:45 +0800, asterisk asterisk wrote:
> ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
> 
> I use the above command to get the system date and time
> 
> it returns 20110321-034329
> 
> but it is exactly 8 hours early than the system time when I type date
> in linux terminal
> 
> Mon Mar 21 19:43:35 HKT 2011
> 
> I am looking for help.
> 
> CK
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] wrong time retrieved from system command

2011-03-21 Thread asterisk asterisk
${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}

I use the above command to get the system date and time

it returns 20110321-034329

but it is exactly 8 hours early than the system time when I type date in
linux terminal

Mon Mar 21 19:43:35 HKT 2011

I am looking for help.

CK
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users