evetion / SpaceLiDAR.jl

A Julia package for working with ICESat-2 & GEDI data as part of my PhD research

Home Page:https://www.evetion.nl/SpaceLiDAR.jl/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get(ENV, "AWS_SESSION_EXPIRES", typemin(DateTime)) returns a string not a DateTime

alex-s-gardner opened this issue · comments

line 18 and 19 of granule.jl is:

    expiry = get(ENV, "AWS_SESSION_EXPIRES", typemin(DateTime))
    if expiry < Dates.now(UTC)

but expiry::String and Dates.now(UTC)::Dates.DateTime so this line throws and error.

Changing line 18 to:
expiry = DateTime(get(ENV, "AWS_SESSION_EXPIRES", typemin(DateTime)))

should fix this

Thanks for catching this! I'm gonna put some EarthData credentials in Github actions to test all these functions, it's too error prone otherwise.