robotframework-robocop icon indicating copy to clipboard operation
robotframework-robocop copied to clipboard

Could the `dateutil` dependency by dropped?

Open fabioz opened this issue 2 years ago • 2 comments

From what I see it's only usage is to get the local timezone, but this is available from the datetime directly.

See: https://stackoverflow.com/a/52606421/110451

Or am I missing something here?

fabioz avatar Oct 06 '22 12:10 fabioz

I see we're using tzlocal() local from dateutil which is improved class over tzinfo from standard datetime. I will ask @rikerfi , do you know why we're using dateutil extra dependency over datetime? Timezones and time conversion are always black magic for me :) I'm asking you since it's used there:

timezone = tz.tzlocal() if self.timezone == "local" else pytz.timezone(self.timezone)

bhirsz avatar Oct 09 '22 18:10 bhirsz

Hey, this is a good point. I'll study and get back to you.

rikerfi avatar Oct 12 '22 13:10 rikerfi

I removed dateutil in #782

mnojek avatar Feb 24 '23 17:02 mnojek