Skip to main content

strftime_python

Function strftime_python 

Source
pub fn strftime_python(
    wall_nanos: i64,
    format: &str,
    zone: Option<(i32, &str)>,
) -> String
Expand description

wall_nanos formatted as Python’s (glibc’s) strftime does - what pandas’ Timestamp.strftime / Series.dt.strftime / to_csv(date_format=) run per value: the C-locale directives (%a %A %b %B %c %d %e %f %H %I %j %m %M %p %S %U %w %W %x %X %y %Y %z %Z %%), glibc’s (%C %D %F %g %G %h %k %l %n %P %r %R %t %T %u %V) and its - (no padding), _ (space padding), 0 and ^ (upper case) flags. An unknown directive is echoed as written, as glibc does. zone is a tz-aware value’s UTC offset (in seconds) and abbreviation at that instant, which %z / %Z print (empty for a naive value).