[Baypiggies] Google App Engine | Data Store | Interval Data type

Glen Jarvis glen at glenjarvis.com
Wed Apr 9 20:56:15 CEST 2008


In trying to port my application to Google's App Engine, I got stuck  
trying to port my data to the Data store. I need an 'interval' data  
type. Example data points include  "3 hours, 2 minutes and 13  
seconds"  and "0 hours, 45 minutes and 15 seconds." (not stored as  
string, of course, but as a time interval).

The only types I can find in the AppEngine is below. I'm certain there  
is a method of storing such a thing. My source data has start_time and  
interval, so I can't subtract end_time and start_time and store the  
result as a time of that length (which sounds very hackish).


Has anyone run into this yet?

DateTimeProperty
DateProperty
TimeProperty
datetime.datetime	Chronological

class DateTimeProperty(verbose_name=None, auto_now=False,  
auto_now_add=False, ...)
A date and time property.
If auto_now is True, the property value is set to the current time  
whenever the model instance is stored in the datastore, overwriting  
the property's previous value. This is useful for tracking a "last  
modified" date and time for a model instance.
If auto_now_add is True, the property value is set to the current time  
the first time the model instance is stored in the datastore, unless  
the property has already been assigned a value. This is useful for  
storing a "created" date and time for a model instance.
Date-time values are stored as and returned using the UTC time zone.  
See datetime.datetime for a discussion of how to manage time zones.
Value type: datetime.datetime


Cheers,


Glen
--
415-680-3964
glen at glenjarvis.com
http://www.glenjarvis.com

"You must be the change you wish to see in the world." -M. Gandhi


On Apr 9, 2008, at 9:51 AM, Glen Jarvis wrote:

> Cancel what I said. It was assuming that every session was a repeat  
> all day long. Also, I  just reviewed the calendar (below). I should  
> have checked on the 'type' of breakout sessions in the schedule. It  
> was silly of me for not looking and only assuming it was listed.
>
> Thanks for pointing this out too. Because, the price is actually  
> quite steep for me (I wish I were still a student this year). I'd  
> hate to pay that and realize that I didn't get the few sessions I  
> wanted (like the datastore one).
>
>
> Wednesday, May 28th 2008
> 8:30 AM
> 9:30 AM
> 11:15 AM - 5:15 PM
> 11:15 AM - 4:00 PM
> 12:00 PM - 2:00 PM
> 6:30 PM - 10:30 PM
> Registration
> Keynote
> Breakout sessions
> Code Labs
> Lunch served
> After Hours at Google I/O
> Thursday, May 29th 2008
> 8:00 AM
> 9:00 AM - 10:00 AM
> 10:15 AM - 4:15 PM
> 10:15 AM - 4:15 PM
> 11:15 AM - 4:00 PM
> 12:00 PM - 2:00 PM
> Breakfast
> General sessions
> Breakout sessions
> Unconference sessions
> Code Labs
> Lunch served
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Apr 9, 2008, at 9:30 AM, Glen Jarvis wrote:
>> I didn't see which sessions were offered at which times. But, I did
>> see a schedule for the day. I would assume that all sessions under  
>> the
>> 'type' are offered when that 'type' is in the schedule. Does that  
>> make
>> any sense?
>>
>>
>> Glen
>> --
>> 415-680-3964
>> glen at glenjarvis.com
>> http://www.glenjarvis.com
>>
>> "You must be the change you wish to see in the world." -M. Gandhi
>>
>>
>> On Apr 9, 2008, at 9:13 AM, Eric Walstad wrote:
>>
>>> On Tue, Apr 8, 2008 at 9:55 PM, Glen Jarvis <glen at glenjarvis.com>
>>> wrote:
>>>> I saw an announcement for Google I/O
>>>> (http://code.google.com/events/io/).
>>>> Is anyone else from BayPIGgies considering attending?
>>>
>>> I'm going, schedule permitting.
>>> Did you find a schedule that shows the session times?  It matters to
>>> me to be able to verify which sessions happen at the same time.  I
>>> didn't even see a mapping between their session types and each
>>> session.  I'd be bummed if I forked out the money and found that all
>>> my target sessions were happening at the same time.
>>>
>>> Anyone from Google listening?
>>>
>>> Eric
>>
>> _______________________________________________
>> Baypiggies mailing list
>> Baypiggies at python.org
>> To change your subscription options or unsubscribe:
>> http://mail.python.org/mailman/listinfo/baypiggies
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/baypiggies/attachments/20080409/12b83e3c/attachment-0001.htm 


More information about the Baypiggies mailing list