why I use googlecl add calendar the time (24h) is not correct?

42 views
Skip to first unread message

cooper

unread,
Sep 14, 2012, 3:20:46 AM9/14/12
to googlecl...@googlegroups.com
Hi all:

I use the googlecl to add the calendar. I send a simple command line in google.exe
google calendar add "1:30 todo" --reminder 10m
That command can be successfully, but in the google calendar that I see the time is 13:30.
I try the time 1~6 clock it always become to 13~18.
How can I do insert the time 1:30 (24h)?

I find the code in date.py
...
def determine_time(self, time_token):
 """Parses time token into a time.

 Note: ambiguous times like "6" are converted according to how Google
 Calendar interprets them. So "1" - "6" are converted to 13-18 on a 24 hour
 clock.

 Args:
   time_token: String to be interpreted as an hour and minute.

 Returns:
   Time object with hour and minute fields filled in if the
   time_token could be parsed. Otherwise, None.
 """
 hour, minute = parse_ambiguous_time(time_token)
 if (hour or minute):
   # The ambiguous hours arranged in order, according to Google Calendar:
   # 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6
   if 1 <= hour and hour <= 6:
     hour += 12
 else:
 ...

I try mark that code ( hour += 12 ) rebuild the date.pyo & replace the lib file.
But the didn't work, that time still 13:30. ><||


br
Cooper

Georges Kopp

unread,
Oct 8, 2014, 1:55:17 AM10/8/14
to googlecl...@googlegroups.com, coope...@gmail.com
Hi there,

I solve it adding pm or am after the time: 1:33am for 1 and 1:33pm for 13:33.
Hope that's help
Georges
Reply all
Reply to author
Forward
0 new messages