Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two date formats in use #50

Closed
staff0rd opened this issue Nov 3, 2015 · 3 comments
Closed

Two date formats in use #50

staff0rd opened this issue Nov 3, 2015 · 3 comments

Comments

@staff0rd
Copy link
Contributor

staff0rd commented Nov 3, 2015

After the inclusion of the ical feature in #43, the cli looks as though it supports two different datetime formats per --help. DATETIME, the format existing prior to ical, which is I believe local time and is converted to UTC+TZ via the DateAndTime object, and the ical specified starttime/endtime of YYYY-MM-DDThh:mm:ss+TZ:00.

For consistency there should probably be only one DATETIME format. I'm not sure why ical needs the full TZ specifier (and I don't know how ical is supposed to work), perhaps @martinm76 can chime in.

@drobertadams
Copy link
Collaborator

I agree. There's no good way to specify which format to use via the command line. I don't know anything about ical either.

@martinm76
Copy link
Contributor

It is fine by me if it can be implemented more generically and simply. This simply happens to be the format expected by the toggl API and I didn't have the knowledge to transform it properly myself.
If either of you are up the the task, I welcome the change.

As long as you can specify ISO dates, I'm happy. If it could transform even stuff like 'last wednesday' and 'yesterday', so much the better. I would certainly like to learn the necessary bits, but right now I don't possess them.

I initially tried to use DATETIME, but failed miserably.

@martinm76
Copy link
Contributor

Looks like possibly the 'parse_local_datetime_str' function of the DateAndTime object would do, but it does not seem to have the flexibility that the Linux 'date' command does. Maybe I can try and see if I can implement it with this, if none of you beat me to it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants