#strftime

2025-09-26

Модуль datetime в Python для начинающих с домашним заданием

Работа с датами и временем в Python — базовая задача, которая часто вызывает трудности у начинающих. В этой статье мы с нуля разберем встроенный модуль datetime, который элегантно решает большинство проблем. Вы научитесь получать текущее время, выполнять операции с датами, а главное — парсить строки и форматировать вывод с помощью strptime и strftime. Это пошаговое руководство для новичков, с практическим заданием на GitHub в конце.

habr.com/ru/articles/950914/

#python #datetime #python_для_начинающих #программирование #strptime #strftime

2024-07-31

Billion-dollar idea: libC-as-a-Service.

#strftime

2024-04-04

@matty

It has been %F %T %z always for many years for me.

#strftime

@dataelemental has moveddataelemental@tilde.zone
2023-11-19

Generating #strftime date format specifier output for testing in #Bash:

`for f in a b c d e f g h j m p r u w x y z A B C D F G H I M R S T U V W X Y Z ':z' '::z' ':::z'; do for ((e = 940000000; e <= 1700000000; e+=13011)); do date --date="@$e" "+$f%t$e%t%$f" >> strftime.tsv; done; done`

2023-07-25

#Python improvement proposal: add longer docstrings to the #strftime methods. I've been using it for years now, and I still haven't committed it to memory. Current documentation is basically tautological :rofl:

2023-03-13

This #strftime site is really cool: strftime.net/. Comprehensive, and you can try out the formatter.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2022-12-05

🤯 Wow this is evil. Isn't #strftime '%s' meant to be the seconds since the epoch in UTC? According to the 'date' man page it is, but apparently #pandas doesn't think so.

#Python #timeseries #analysis

IPython screenshot, several invocations of pd.to_datetime with the epoch 1970-01-01 with and without UTC timezone offset +0000 or argument utc=True specified, strftime("%s") is always '-3600'man page of the 'date' command, documentation of %s highlighted, stating that it's the 'seconds since the Epoch (1970-01-01 00:00 UTC)'
Diabolic Preacher ♒dpreacher@freeradical.zone
2020-04-24

today i learned to slightly edit the i3status.conf and then took a whole day not realizing that i'd never put the local file in the right path in my home dir. I'd been telling others about how without work, with weeks of not stepping out of the house at all, I'd lost track of which day it is in the week. Not any more! Thanks %a #strftime #i3status #slowpoke

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst