▲ 1929 ▼ 2023-08-09.jpg (lemmy.ml) submitted 3 years ago* by Samsy@lemmy.ml to c/memes@lemmy.ml 321 comments fedilink hide all child comments
[–] FleetingTit@feddit.de 19 points 3 years ago (7 children) ISO 8601 ftw. Here's the date, time, and duration for our next meeting: 2023-08-10T20:00:00PT2H30M permalink fedilink source parent hideshow 7 child comments replies: [–] Llewellyn@lemmy.ml 3 points 3 years ago (4 children) But where is a timezone? permalink fedilink source parent hideshow 4 child comments replies: [–] Samsy@lemmy.ml [S] 3 points 3 years ago PT, Pacific time. /s permalink fedilink source parent [–] Zeragamba@lemmy.ca 2 points 3 years ago (2 children) Timezone is optional, and when missing is read as local time. permalink fedilink source parent hideshow 2 child comments replies: [–] GamingChairModel@lemmy.world 1 point 3 years ago (1 child) In my mind, default is UTC unless otherwise specified. permalink fedilink source parent hideshow 1 child comment replies: [–] Zeragamba@lemmy.ca 1 point 3 years ago luckily Local time can be any timezone! permalink fedilink source parent [–] Zeragamba@lemmy.ca 1 point 3 years ago (1 child) nearly forgot that 8601 has support for durations as well permalink fedilink source parent hideshow 1 child comment replies: [–] baltakatei@sopuli.xyz 1 point 3 years ago It handles ambiguity too. Want to say something lasts for a period of 1 month without needing to bother checking how many days are in the current and next month? P1M. Done. Want to be more explicit and say 30 days? P30D. Want to say it in hours? Add the T separator: PT720H. I used this kind of notation all the time when exporting logged historical data from SCADA systems into a file whose name I wanted to quickly communicate the start of a log and how long it ran: 20230701T0000-07--P30D..v101_pressure.csv (“--” is the ISO-8601 (2004) recommended substitute for “/” in file names) If anyone is interested, I made this Bash script to give me uptime but expressed as an ISO 8601 time period. $ bkuptime P2DT4H22M4S/2023-08-15T02:01:00+0000, 2 users, load average: 1.71, 0.87, 0.68 permalink fedilink source parent
[–] Llewellyn@lemmy.ml 3 points 3 years ago (4 children) But where is a timezone? permalink fedilink source parent hideshow 4 child comments replies: [–] Samsy@lemmy.ml [S] 3 points 3 years ago PT, Pacific time. /s permalink fedilink source parent [–] Zeragamba@lemmy.ca 2 points 3 years ago (2 children) Timezone is optional, and when missing is read as local time. permalink fedilink source parent hideshow 2 child comments replies: [–] GamingChairModel@lemmy.world 1 point 3 years ago (1 child) In my mind, default is UTC unless otherwise specified. permalink fedilink source parent hideshow 1 child comment replies: [–] Zeragamba@lemmy.ca 1 point 3 years ago luckily Local time can be any timezone! permalink fedilink source parent
[–] Zeragamba@lemmy.ca 2 points 3 years ago (2 children) Timezone is optional, and when missing is read as local time. permalink fedilink source parent hideshow 2 child comments replies: [–] GamingChairModel@lemmy.world 1 point 3 years ago (1 child) In my mind, default is UTC unless otherwise specified. permalink fedilink source parent hideshow 1 child comment replies: [–] Zeragamba@lemmy.ca 1 point 3 years ago luckily Local time can be any timezone! permalink fedilink source parent
[–] GamingChairModel@lemmy.world 1 point 3 years ago (1 child) In my mind, default is UTC unless otherwise specified. permalink fedilink source parent hideshow 1 child comment replies: [–] Zeragamba@lemmy.ca 1 point 3 years ago luckily Local time can be any timezone! permalink fedilink source parent
[–] Zeragamba@lemmy.ca 1 point 3 years ago luckily Local time can be any timezone! permalink fedilink source parent
[–] Zeragamba@lemmy.ca 1 point 3 years ago (1 child) nearly forgot that 8601 has support for durations as well permalink fedilink source parent hideshow 1 child comment replies: [–] baltakatei@sopuli.xyz 1 point 3 years ago It handles ambiguity too. Want to say something lasts for a period of 1 month without needing to bother checking how many days are in the current and next month? P1M. Done. Want to be more explicit and say 30 days? P30D. Want to say it in hours? Add the T separator: PT720H. I used this kind of notation all the time when exporting logged historical data from SCADA systems into a file whose name I wanted to quickly communicate the start of a log and how long it ran: 20230701T0000-07--P30D..v101_pressure.csv (“--” is the ISO-8601 (2004) recommended substitute for “/” in file names) If anyone is interested, I made this Bash script to give me uptime but expressed as an ISO 8601 time period. $ bkuptime P2DT4H22M4S/2023-08-15T02:01:00+0000, 2 users, load average: 1.71, 0.87, 0.68 permalink fedilink source parent
[–] baltakatei@sopuli.xyz 1 point 3 years ago It handles ambiguity too. Want to say something lasts for a period of 1 month without needing to bother checking how many days are in the current and next month? P1M. Done. Want to be more explicit and say 30 days? P30D. Want to say it in hours? Add the T separator: PT720H. I used this kind of notation all the time when exporting logged historical data from SCADA systems into a file whose name I wanted to quickly communicate the start of a log and how long it ran: 20230701T0000-07--P30D..v101_pressure.csv (“--” is the ISO-8601 (2004) recommended substitute for “/” in file names) If anyone is interested, I made this Bash script to give me uptime but expressed as an ISO 8601 time period. $ bkuptime P2DT4H22M4S/2023-08-15T02:01:00+0000, 2 users, load average: 1.71, 0.87, 0.68 permalink fedilink source parent