Skip to content

Set the timestamp for each file when adding data from a stream #27

Description

@josteinl

Thank you for a very nice package.

I am missing the ability to set the last modified timestamp for each file when adding them from a stream.

I tried this, but the zs.add() does not take a date_time parameter:

zs.add(
    data=file_data,
    arcname=file_name,
    date_time=file.updated_at.timetuple()
    if file.updated_at and file.updated_at.year >= 1980
    else datetime.now().timetuple(),
)

Maybe it's possible to do it in another way, but I did not find it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions