RE: [fw-general] Json date type encoding/ decoding

2007-12-25 Thread Steven Brown
Why don't you just use the result of time() (seconds since jan 1st 1970) and
do the date translation at the other end...

-Original Message-
From: Stephan Stapel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 26 December 2007 5:22 AM
To: fw-general@lists.zend.com
Subject: [fw-general] Json date type encoding/ decoding

Hi!

I'm working on scripts to to synchonize a website against a backend
system. I'm planning to use json to transfer data back and forth between
the systems which works rather well because of the small footprint (in
comparison to xml).

However, today I ran into a problem around date representation. Doing a
little google search, I discovered that there are misc attempts to
represent date/ datetime types in json, e.g.

@119862720@
and
new Date(119862720)

there seems to be no standard yet, however, the second variant looks quite
common.

Did anyone of you also have this problem and how did you solve it?
Basically, it'd imho be cool to convert such a value into a Zend_Date
type. What do you think? Would a patch of

Zend_Json_Decoder::_decodeValue()

have a chance to be included into the framework? Or would you rather wait
until the date representation is standardized?

cheers,

Stephan






[fw-general] Json date type encoding/ decoding

2007-12-25 Thread Stephan Stapel
Hi!

I'm working on scripts to to synchonize a website against a backend
system. I'm planning to use json to transfer data back and forth between
the systems which works rather well because of the small footprint (in
comparison to xml).

However, today I ran into a problem around date representation. Doing a
little google search, I discovered that there are misc attempts to
represent date/ datetime types in json, e.g.

@119862720@
and
new Date(119862720)

there seems to be no standard yet, however, the second variant looks quite
common.

Did anyone of you also have this problem and how did you solve it?
Basically, it'd imho be cool to convert such a value into a Zend_Date
type. What do you think? Would a patch of

Zend_Json_Decoder::_decodeValue()

have a chance to be included into the framework? Or would you rather wait
until the date representation is standardized?

cheers,

Stephan