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

Convert dates from list to datetime format #17

Open
EwoutH opened this issue Oct 19, 2022 · 2 comments
Open

Convert dates from list to datetime format #17

EwoutH opened this issue Oct 19, 2022 · 2 comments

Comments

@EwoutH
Copy link
Owner

EwoutH commented Oct 19, 2022

Currently the routescanner dates and times are scraped in a list format, for example ['21 OCT', ' 02:57', 'UTC-03:00']. It could be useful to convert this to datetime, to make it easier processable.

Keep in mind:

  • Timezones
  • Daylight savings time
  • Year changes
@thomassandbergen
Copy link
Collaborator

Same thing for Maersk but in a different date format. Should be discussed shortly on monday with @imvs95

@thomassandbergen
Copy link
Collaborator

Maersk date is standard in ie 04 March 2023 10:00. The following line of code fixes this for ie departure time. This code has been implemented

departure_date = datetime.strptime(departure_date,"%d %b %Y %H:%M")

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

No branches or pull requests

2 participants