- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
And if can get it up to do it again after that, I will be impressed.
Admin
Admin
Perhaps he did this to keep his $times array from losing state.
Admin
Looks like PHP. I guess "date('g:i a', $seconds_since_epoch);" was too complicated?
Admin
It's not an inside joke, you hack. Maybe you can't tell, but this function is completely needless, and the Wyoming thing is so far off the map it isn't even worth discussing.
Admin
Wait, let me back up a step.
In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.
Admin
umad bro?
Admin
Well, maybe. But it's the only rock we have.
Admin
We're not in Kansas anymore.
Admin
Just for fun, why don't you write a quick "Phobos time zone" conversion module?
Admin
Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.
Admin
30:10, 6: thirty and ten seconds, six o'clock.
Admin
But the people who control those flights live on Earth, and Earth time is surely more convenient for them to operate by.
To date the only manned spaceflights to go further than a few miles up have been six Apollo missions to the Moon. I'm not sure how many people have lived since the first flight to the Moon, but as the present population is about 6 billion, it's at least that many. I think it's a little premature to completely revamp all of our timekeeping to accomodate 18 people out of 6 billion. Especially considering those 18 all spent only a tiny fraction of their lives away from the Earth.
When we get to the point where we have a permanent base or colony on another planet, then we'll need a more general time-keeping system. Not to be pessimistic, but at the rate we're going, I think we have plenty of time to plan for that.
Admin
Actually, Wyoming is the only entry in that table that IS on a map.
Admin
In a perfect universe, no one would insist that I adopt a time-keeping system tailored to the needs of beings living light-years away and whom I have never met.
I don't walk around on my hands with my feet in the air just because people in Australia are oriented in that direction. I deal with the practicalities of local conditions.
Admin
I had to take look at Map. Wyoming is not looking like anything of consequence like New York City.
Admin
Admin
What is that, Planck Time units since the Planck Epoch?
Admin
Please show a little sensitivity. I had a son who once included boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow, and let me assure you, it was no laughing matter.
Admin
A neat idea, but difficult to calibrate with any degree of exactitude.
Admin
"4:30" => "time for Wapner"
Admin
+1
Admin
$returntab[""] = ""; $start_hour = 12; for($i=0; $i<=13; $i++) { $ispairloop = $i % 2; $halfhourrepresentation = ($ispairloop ? '30':'00'); $curkey = $start_hour.':'.$halfhourrepresentation.':00'; $curval = substr('00'.($start_hour <= 12 ? $start_hour : $start_hour-12),-2).':'.$halfhourrepresentation.' pm'; $returntab[$curkey] = $curval; if ($ispairloop) $start_hour++; } $returntab["WY"] = "Wyoming";
So simple...
Admin
He left out the canonical hours of Matins, Lauds, Terce, Sext, None, and Vespers.
Admin
Admin
WY = TIME_NOT_FOUND Is it safe to say that Wyoming is the land that time forgot?
Admin
You could use it to initialize dictionaries as well:
Admin
Once again a binary mindset shows its shortcomings.
Those of us weaned before the advent of computers learned, correctly, that noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.
Better coding would be: ... "12:00:00" => "12 noon", "24:00:00" => "12 midnight";
If you don't understand this, ask yourself what the a. stands for, what the p. stands for, and what the m. stands for. Then ask yourself when is the m.?
Admin
Sorry...
I only deal with stardates. Ahead warp factor 4.
Admin
Almost:
[image]Admin
Admin
At least there was one funny comment here.
Admin
And now you're wrong, per common (and NIST) convention, and do nothing but to sow confusion amongst all.
Admin
Admin
Admin
Years ago, I wrote and used some routines for date and time input and output. One feature was that for 12 noon, all you had to enter was "m". And if you used am/pm for printing the time on a report, it would display noon as "12:00 m" or "12:00:00 m", depending on whether you selected to print the seconds. One second before noon was displayed and printed as "11:59:59 am" and one second afternoon was displayed and printed as "12:00:01 pm".
One thing that the routines were used in was some software to write automated traffic tickets. That led to an interesting call from a courthouse. One guy tried to have a speeding ticket dismissed because it was clearly daylight and so it couldn't have been issued at midnight.
Admin
From http://physics.nist.gov/News/Releases/questions.html:
Admin
chorus: For we walk with our feet in Australia; yes we walk with our feet on the ground.... Though we may be "Down Under", you shouldn't make the Blunder, of think that we're upside down.
All the people, that live in the Northern Hemisphere, Think that our grass is blue. But if you happen to live in the Southern Hemisphere Then it's just not true... chorus
Lorraine Milne (not sure the second verse is quite right)
Admin
Admin
"Hey, Bob... Can you make a quick PHP script to convert times into more 'friendly' strings?"
"How do I do that?"
"I don't know... Try associative arrays."
"I don't know anything about those."
"Just copy US_state_list.php, and strip out everything between the first line with the open parenthesis and the line with the closing parenthesis, and fill in the times using the same style."
Admin
I tell you, nothing good happens after 1830, nothing. And it usually happens in Wyoming.
Admin
Let me add this, please:
The printed train and bus schedules of my youth were printed in lightface and boldface. By convention, lightface was a.m., and boldface was p.m.
Since noon was neither, that's why there were so many arrivals at 11:59 (lightface), and so many departures at 12:01 (boldface).
Admin
TRWTF is Americans don't understand the 24 hour clock while the rest of the world does.
Admin
TRWTF is when your fellow programmers said there is nothing wrong with previous code. And after we included your code, finally they get it. Yeah we forgot the minutes.
-feugiat-
Admin
Admin
Admin
I suppose it's possible that the initial application for which this routine was run only actually used times to the nearest half hour, and only during business hours.
Doesn't excuse the shittiness of its design, though.
Admin
-Harrow.
Admin
$this_thread = array( "you" => "win" );
Admin
Nonexistent?