#soylent | Logs for 2024-03-02

« return
[00:46:46] -!- requerdanos has quit [Quit: Offline for hardware maintenance]
[02:07:05] -!- requerdanos [requerdanos!~requerdan@Soylent/Staff/Editor/requerdanos] has joined #soylent
[02:07:05] -!- mode/#soylent [+v requerdanos] by Imogen
[02:54:36] -!- soylentil59 has quit [Quit: Client closed]
[15:56:07] <Ingar> Internal Server Error!
[15:58:22] <fab23> Ingar: my bot already reportet that in #staff, all I can do
[16:01:29] <Ingar> at some point the system will became aware. thanks
[16:01:45] <fab23> Ingar: site is up again, magic :)
[16:02:14] <Ingar> ye good ol'e reboot
[16:02:41] <fab23> and the top posting is something about systems not able to handle 29. Feburary :)
[16:02:51] <janrinok> Well if it was a reboot, I don't know who did it :)
[16:02:57] <janrinok> lol
[16:03:35] <fab23> Internal Server Error is mostly the application behind the webserver failing, for what ever reason
[17:23:53] <Ingar> it's the Internet equivalent of "not now honey, me headache"
[17:25:01] <fab23> :)
[17:26:24] <fab23> it happen again, just in case you did not notice :)
[17:26:41] <Ingar> I was in the kitchen, cutting veggies
[17:26:48] <Ingar> jsut taking a smoke break :)
[17:27:19] <fab23> the veggies would be healthy, but with the somke you revert it :)
[17:27:34] <Ingar> It brings balance to the force
[17:27:53] <fab23> I see
[17:29:07] <Ingar> I'll give you a starball before I return to business
[17:29:09] <Ingar> http://ingar.intranifty.net
[17:32:35] <fab23> site is up again
[18:03:01] <Bytram> Hi! Can anyone help me? I'm looking for a Linux/Ubuntu tool that can (1) take 2 dates and report time difference between them, or (2) report time difference between a date and today.
[18:03:19] <Bytram> Any suggestions?
[18:04:07] <Bytram> If so, pleases ping me :)
[18:08:42] <Bytram> e.g. Given: 2024-02-01 would report: 29 days, etc... hmmm. I might already have that?!
[18:14:46] <fab23> hm, not sure if 'date' could do it, at least in works the other way around, e.g. giving the date in 100 days.
[18:40:57] <Bytram> I *thought* I had something! It had a different filename filename pattern than what I had remembered. :(
[18:46:22] <Bytram> I had written a tool LONG ago, which would report number_of_seconds, number_of_minutes, ... hours ... days ... months ... years. :^)
[18:52:40] <janrinok> Bytram, when you say you want a time difference (a time 'delta') what format do you want it in? Days, seconds since the epoch, hours and decimal hours? There are routines to do what you want but I think that you need to clarify what you want to see as the output or explain how you intend to use it.
[19:01:41] <Bytram> My tool was written making use of *several* window batch programs... it's gonna take some work to flesh them out that works with AWK.
[19:02:25] <Bytram> Here is the "guts" of the code that does the work:
[19:02:34] <Bytram> BEGIN
[19:02:42] <Bytram> # Initialize the results:
[19:02:42] <Bytram> delta_years = 0;
[19:02:42] <Bytram> delta_months = 0;
[19:02:42] <Bytram> delta_days = 0;
[19:02:42] <Bytram> delta_hours = 0;
[19:02:43] <Bytram> delta_minutes = 0;
[19:02:45] <Bytram> delta_seconds = 0;
[19:02:47] <Bytram> start_years = strftime("%Y", t1);
[19:02:49] <Bytram> start_months = strftime("%m", t1);
[19:02:51] <Bytram> start_days = strftime("%d", t1);
[19:02:53] <Bytram> start_hours = strftime("%H", t1);
[19:02:55] <Bytram> start_minutes = strftime("%M", t1);
[19:02:57] <Bytram> start_seconds = strftime("%S", t1);
[19:03:01] <Bytram> END
[19:03:22] <janrinok> ah, I cannot help you with windows but let have a see at what you have printed....
[19:07:35] <janrinok> So both date/times will be in the format "%Y %m %d %H %M %S" ? Will you have separators? e.g. 27-03-2024 19:34;35? Will the date format be US style or European? Do you want the year first (makes date/times sorting easier) or just the format that you have specified?
[19:08:06] <Ingar> Bytram: https://unix.stackexchange.com
[19:08:07] <systemd> ^ 03get elapsed time in bash
[19:11:51] <Bytram> janrinok: Broken into space-delimiter strings.
[19:12:51] <Bytram> ECHO CALL mktime --quiet "1993 08 29 00 00 01 -1"
[19:14:40] <Bytram> as you can see, it's been a LONG time sine I worked on it; I've forgotten a LOT!
[19:29:33] <Bytram> For details, look at: #dev
[19:32:31] <janrinok> I'm confused - I thought you wanted space delimited?
[19:32:36] <Bytram> YIKES! That was over 30 YEAR ago! No wonder my brain hurts from trying to remember the details!!
[19:34:21] <Bytram> I *did*; copy/paste of the files strips away all of the blank lines. :/
[19:34:24] <janrinok> People are discussing the reasons why nobody should be using their own date time conversions. There are libraries dedicated to this sort of thing. See the current latest story "It's That Most Wonderful Time of the Year When Tech Cannot Handle the Date"
[19:40:04] <Bytram> If you look closer, all I *really* do is pass the space-delimited values through various incantations of: strftime
[19:40:47] <Bytram> <wink>
[19:43:11] <janrinok> I know but that doesn't calculate time deltas. It doesn't take into account timezones, or DST, or anything else. But if you don't tell us how you intend to use the data nobody can answer your question. I don't think anyone will give you a solution based on AWK.
[19:43:16] <Bytram> But seriously, I am so grateful that I included LOTS of comments (!) but still... 30 year old code?
[19:43:32] <Bytram> My brain hurts!
[19:43:57] <janrinok> It is approaching my bedtime too.
[19:44:00] <Bytram> break time
[19:44:29] <Bytram> So nice to chat with you!
[19:45:21] <Bytram> Now, go to bed: :)
[20:59:29] -!- NotSanguine [NotSanguine!~NotSangui@357-481-070-982.biz.spectrum.com] has joined #soylent
[21:05:12] -!- NotSanguine has quit [Quit: Client closed]
[21:09:55] -!- aristarchus [aristarchus!~aristarch@212.102.ty.jzm] has joined #soylent
[21:12:37] <aristarchus> chromas, +r,  moar censorship in response to protests about censorship is almost never the right  answer.
[21:18:33] -!- aristarchus has quit [Quit: Client closed]
[21:27:20] -!- NotSanguine [NotSanguine!~Thunderbi@357-481-070-982.biz.spectrum.com] has joined #soylent
[23:28:00] <halibut> Bytram: Maybe not exactly what you are looking for, but the Python datetime module handles a lot of that functionality pretty easily.
[23:28:05] <halibut> For example:
[23:28:11] <halibut> python -c 'import datetime; print(str(datetime.datetime.strptime("2024-02-01","%Y-%m-%d")-datetime.datetime.now()))'
[23:28:27] <halibut> (Would look a lot better if not converted to a one-liner and called on the command line.)