openclimatefix / ocf-infrastructure

Infrastructure code for OCF's cloud environments
3 stars 7 forks source link

Deprecation of datetime.utcnow() #528

Closed aryanbhosale closed 2 months ago

aryanbhosale commented 2 months ago

Describe the bug

ocf-infrastructure is currently using the deprecated '''datetime.utcnow()''' from the datetime python library. It would be good to use a timezone-aware function that'll work for python3.11^ and won't change the current functionality

Possible implementation

One possible modification would be datetime.now(tz=timezone.utc) where timezone is imported from datetime

aryanbhosale commented 2 months ago

Hi @peterdudfield , why does it show that a terraform test failed? any idea? is it my code or something else? image

peterdudfield commented 2 months ago

Hi @peterdudfield , why does it show that a terraform test failed? any idea? is it my code or something else? image

No dont worry about that, that'll be something else. I imagine it got cancelled manually

aryanbhosale commented 2 months ago

Hi @peterdudfield , why does it show that a terraform test failed? any idea? is it my code or something else? image

No dont worry about that, that'll be something else. I imagine it got cancelled manually

Oh okay, thank you

aryanbhosale commented 2 months ago

Hi @peterdudfield , #530 is the fix for this, could you please review this? Thank you