Skip to main content

Module upload_helpers

Module upload_helpers 

Source
Expand description

Upload-related helper functions: MIME detection, timezone fixup, file timestamps.

Pure utility functions shared by the upload pipeline. Includes IANA timezone resolution from /etc/localtime or $TZ, ISO 8601 formatting, and filesystem timestamp normalization.

FunctionsΒ§

apply_asset_timezone_fixup πŸ”’
Make a PUT request to the server to update the timezone offset of a specific asset.
file_timestamps πŸ”’
Retrieve and normalize the creation and modification timestamps of a local file.
local_timezone_name πŸ”’
Resolve the user’s current local timezone name (IANA format) from system files or environment.
looks_like_iana_timezone πŸ”’
Check if the timezone name string strictly matches IANA zone style.
mime_for_path πŸ”’
Resolve the standard MIME type for a given local file path.
normalize_file_timestamps πŸ”’
Coalesce and normalize creation/modification timestamps using standard rules.
system_time_to_unix_secs πŸ”’
Convert a standard SystemTime to standard unix epoch seconds.
unix_to_utc_iso8601 πŸ”’
Convert standard unix epoch seconds to standard UTC ISO 8601 formatted string.