b

    Borut Hafner

    1 year ago
    Dear All, I want to use a fixed point in time in my tasks. An option would be to create a task whiche returns current datetime, but i suppose that flow can offer this information in form of a flow start time. Is a way to get a flow stard date time in a task? Thanks for your answers!
    l

    Loic M

    1 year ago
    Would
    prefect.context.get("scheduled_start_time")
    give you the information you need ?
    b

    Borut Hafner

    1 year ago
    Yes this should be it. But as i understand it is UTC time, is it posible to get it in local time or do i have to convert it?
    Dylan

    Dylan

    1 year ago
    Hi @Borut Hafner! I definitely second Loic’s suggestion here. Yes, you will need to convert the timestamp yourself, but that should be a straightforward exercise in python. I personally love https://pendulum.eustace.io/
    b

    Borut Hafner

    1 year ago
    Thanks both! I agree about conversion, but I asked just in case, if prefect provides this functionality.