Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
PHP MongoDate changed to ISODate, why?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RJ  
View profile  
 More options Oct 3 2011, 5:24 pm
From: RJ <rjdjohns...@gmail.com>
Date: Mon, 3 Oct 2011 14:24:37 -0700 (PDT)
Local: Mon, Oct 3 2011 5:24 pm
Subject: PHP MongoDate changed to ISODate, why?
Hello,

I recently updated a library that uses PHP's MongoDate to store all
date related fields.

After running the library I noticed MongoDate objects were no longer
being stored.  Instead an ISOdate object is stored.

Any idea's what I "accidentally" did to trigger the change?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Flavio Percoco  
View profile  
 More options Oct 3 2011, 5:30 pm
From: Flavio Percoco <flape...@gmail.com>
Date: Mon, 03 Oct 2011 23:30:26 +0200
Local: Mon, Oct 3 2011 5:30 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

Hi,

MongoDate[0] representes date objects for the database which are
ISODates[1].

[0] http://www.php.net/manual/en/class.mongodate.php
[1] http://www.mongodb.org/display/DOCS/Data+Types+and+Conventions

Cheers


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RJ Johnston  
View profile  
 More options Oct 3 2011, 6:18 pm
From: RJ Johnston <rj.johns...@monthsof.me>
Date: Mon, 3 Oct 2011 18:18:11 -0400
Local: Mon, Oct 3 2011 6:18 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

Flavio,

Thank you for responding although I don't think this answers my question.

Let me clarify; previously date objects were stored as MongoDate (sec =>
1235, usec => 1235).

Now they are stored like ISOdate("yyyy-dd-mm").

I do not know what I did to trigger this alternative save method.  Maybe the
right question is "what do you have to pass a new MongoDate(xxx) object to
return an ISOdate() object?

I should be able to reverse eng from there and correct.

Thanks

Sent from my iPhone

On Oct 3, 2011, at 5:30 PM, Flavio Percoco <flape...@gmail.com> wrote:

Hi,

MongoDate[0] representes date objects for the database which are
ISODates[1].

[0] http://www.php.net/manual/en/class.mongodate.php
[1] http://www.mongodb.org/display/DOCS/Data+Types+and+Conventions

Cheers

 ------------------------------

 <compose-unknown-contact.jpg>RJ <rjdjohns...@gmail.com>
3 de octubre de 2011 23:24

Hello,

I recently updated a library that uses PHP's MongoDate to store all
date related fields.

After running the library I noticed MongoDate objects were no longer
being stored. Instead an ISOdate object is stored.

Any idea's what I "accidentally" did to trigger the change?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristina Chodorow  
View profile  
 More options Oct 4 2011, 10:02 am
From: Kristina Chodorow <k.chodo...@gmail.com>
Date: Tue, 4 Oct 2011 07:02:01 -0700 (PDT)
Local: Tues, Oct 4 2011 10:02 am
Subject: Re: PHP MongoDate changed to ISODate, why?
MongoDB has a "date" type.  In PHP, this is deserialized to a
MongoDate.  In the mongo shell, this is deserialized to ISODate.  If
you're seeing ISODates in the shell, that is normal and how dates
should look in the shell. Are you seeing ISODate in PHP?  If so, can
you paste a var_dump of the document?

On Oct 3, 6:18 pm, RJ Johnston <rj.johns...@monthsof.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RJ Johnston  
View profile  
 More options Oct 4 2011, 3:42 pm
From: RJ Johnston <rj.johns...@monthsof.me>
Date: Tue, 4 Oct 2011 15:42:45 -0400
Local: Tues, Oct 4 2011 3:42 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

No thoughts?

I noticed another anomaly, all the "/" symbols are now escaped!  (http:\/\/
someurl.com).  Cannot figure this out either.  Maybe related?

Sent from my iPhone

On Oct 3, 2011, at 5:30 PM, Flavio Percoco <flape...@gmail.com> wrote:

Hi,

MongoDate[0] representes date objects for the database which are
ISODates[1].

[0] http://www.php.net/manual/en/class.mongodate.php
[1] http://www.mongodb.org/display/DOCS/Data+Types+and+Conventions

Cheers

 ------------------------------

 <compose-unknown-contact.jpg>RJ <rjdjohns...@gmail.com>
3 de octubre de 2011 23:24

Hello,

I recently updated a library that uses PHP's MongoDate to store all
date related fields.

After running the library I noticed MongoDate objects were no longer
being stored. Instead an ISOdate object is stored.

Any idea's what I "accidentally" did to trigger the change?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Millman  
View profile  
 More options Oct 4 2011, 3:59 pm
From: Sam Millman <sam.mill...@gmail.com>
Date: Tue, 4 Oct 2011 20:59:56 +0100
Local: Tues, Oct 4 2011 3:59 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

ISO date is tz compliant, notice the format of the time when looking at it
in shell.

escaping is normal for BSON (think of JSON) arrays. Slashs is always a bit
of a problem.

How exactly are they being stored in your DB?

On 4 October 2011 20:42, RJ Johnston <rj.johns...@monthsof.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Millman  
View profile  
 More options Oct 4 2011, 4:02 pm
From: Sam Millman <sam.mill...@gmail.com>
Date: Tue, 4 Oct 2011 21:02:03 +0100
Local: Tues, Oct 4 2011 4:02 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

What I was meant to say on the end of that is that so long as they do not
come out of your PHP script escaped everyhting is fine.

If they do then there is something afoot that we need to get to the root of.

On 4 October 2011 20:59, Sam Millman <sam.mill...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Millman  
View profile  
 More options Oct 4 2011, 4:07 pm
From: Sam Millman <sam.mill...@gmail.com>
Date: Tue, 4 Oct 2011 21:07:56 +0100
Local: Tues, Oct 4 2011 4:07 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

Also ISODate is international format:

http://www.w3.org/QA/Tips/iso-date

Basically it is better than the old date object

On 4 October 2011 21:02, Sam Millman <sam.mill...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Millman  
View profile  
 More options Oct 4 2011, 4:14 pm
From: Sam Millman <sam.mill...@gmail.com>
Date: Tue, 4 Oct 2011 21:14:57 +0100
Local: Tues, Oct 4 2011 4:14 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

Ha!

I only just noticed the original question:

"Any idea's what I "accidentally" did to trigger the change?"

Answer: You upgraded.

The old date() object is dead. You need not do anything different it will
just make the date storing in the DB better.

On 4 October 2011 21:07, Sam Millman <sam.mill...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RJ  
View profile  
 More options Oct 4 2011, 10:27 pm
From: RJ <rjdjohns...@gmail.com>
Date: Tue, 4 Oct 2011 19:27:08 -0700 (PDT)
Local: Tues, Oct 4 2011 10:27 pm
Subject: Re: PHP MongoDate changed to ISODate, why?
Brilliant!  Thanks Sam

On Oct 4, 4:14 pm, Sam Millman <sam.mill...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KevOu  
View profile  
 More options Sep 16 2012, 6:38 pm
From: KevOu <kevin.chi...@gmail.com>
Date: Sun, 16 Sep 2012 15:38:30 -0700 (PDT)
Local: Sun, Sep 16 2012 6:38 pm
Subject: Re: [mongodb-user] PHP MongoDate changed to ISODate, why?

Sammaye,

Could you indicate which lib you're talking about ?
I'm interested in the way you managed to format the date on PHP side (to an
ISODate) to upload in Mongo DB BSON ISODate format.

Thanks for your kind help,

Le mardi 4 octobre 2011 22:14:57 UTC+2, Sammaye a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fwd: PHP MongoDate changed to ISODate, why?" by Sam Millman
Sam Millman  
View profile  
 More options Sep 16 2012, 7:20 pm
From: Sam Millman <sam.mill...@gmail.com>
Date: Mon, 17 Sep 2012 00:20:10 +0100
Local: Sun, Sep 16 2012 7:20 pm
Subject: Fwd: PHP MongoDate changed to ISODate, why?

Forwarding back down to mongodb-user. Poster accidently posted directly to
me.

On 17 September 2012 00:19, Sam Millman <sam.mill...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "PHP MongoDate changed to ISODate, why?" by Kevin Childs
Kevin Childs  
View profile  
 More options Sep 17 2012, 3:07 am
From: Kevin Childs <kevin.chi...@gmail.com>
Date: Mon, 17 Sep 2012 09:07:37 +0200
Local: Mon, Sep 17 2012 3:07 am
Subject: Re: PHP MongoDate changed to ISODate, why?

I saw that, but MongoDate constructor doesn't manage TZ although ISODate does :-)

Kev

Le 17 sept. 2012 à 01:20, Sam Millman <sam.mill...@gmail.com> a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Millman  
View profile  
 More options Sep 17 2012, 3:22 am
From: Sam Millman <sam.mill...@gmail.com>
Date: Mon, 17 Sep 2012 08:22:48 +0100
Local: Mon, Sep 17 2012 3:22 am
Subject: Re: [mongodb-user] Re: PHP MongoDate changed to ISODate, why?

Yea MongoDate can take a tz, it will default it down to Z time with a +
notation for the tz but you must set the PHP timezone to be that tz in
order for it to work.

On 17 September 2012 08:07, Kevin Childs <kevin.chi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Childs  
View profile  
 More options Sep 17 2012, 3:41 am
From: Kevin Childs <kevin.chi...@gmail.com>
Date: Mon, 17 Sep 2012 09:41:29 +0200
Local: Mon, Sep 17 2012 3:41 am
Subject: Re: [mongodb-user] Re: PHP MongoDate changed to ISODate, why?

Aaaaahhhh ok ill try :-) thx

Kev

Le 17 sept. 2012 à 09:22, Sam Millman <sam.mill...@gmail.com> a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »