• (cs) in reply to Hmmmm
    Hilarious Dudebro:
    Now do it again and include boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow.

    And if can get it up to do it again after that, I will be impressed.

  • foo (unregistered) in reply to TheJonB
    TheJonB:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!

    The only acceptable time format is clearly MM hh ss.

    So 30 6 10 reads "Thirty minutes past six and 10 seconds" like some Americans might say it.

    Also "18:50:42.5" => "-10\7p\MDT\42 1/2". Nothing could be clearer.
  • $person_name (unregistered)

    Perhaps he did this to keep his $times array from losing state.

  • Spoe (unregistered)

    Looks like PHP. I guess "date('g:i a', $seconds_since_epoch);" was too complicated?

  • LANMind (unregistered) in reply to Nagesh
    Nagesh:
    Some inside joke WTF should not be published. I am finding hard to get joke here.

    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.

  • Jeff (unregistered) in reply to PedanticCurmudgeon
    PedanticCurmudgeon:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!
    Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.
    In a perfect world, there are no time zones.

    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.

  • null (unregistered) in reply to LANMind
    LANMind:
    Nagesh:
    Some inside joke WTF should not be published. I am finding hard to get joke here.

    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.

    umad bro?

  • (cs) in reply to Jeff
    Jeff:
    PedanticCurmudgeon:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!
    Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.
    In a perfect world, there are no time zones.

    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.

    Well, maybe. But it's the only rock we have.

  • Sarcastic kebab reaper (unregistered)

    We're not in Kansas anymore.

  • Niel (unregistered) in reply to Coyne
    Coyne:
    Jeff:
    PedanticCurmudgeon:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!
    Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.
    In a perfect world, there are no time zones.

    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.

    Well, maybe. But it's the only rock we have.

    Don't be so sure. We've had spacecraft on, orbiting or visiting our moon, several planets, and even moons of other planets for decades now. And it does get a little weird scheduling mission events in Earth-centric time.

    Just for fun, why don't you write a quick "Phobos time zone" conversion module?

  • trtrwtf (unregistered) in reply to Jeff
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

  • (cs) in reply to TheJonB
    TheJonB:
    The only acceptable time format is clearly MM hh ss.
    Or by application of slightly different logic: MM:ss, h.

    30:10, 6: thirty and ten seconds, six o'clock.

  • Jay (unregistered) in reply to Niel
    Niel:
    Don't be so sure. We've had spacecraft on, orbiting or visiting our moon, several planets, and even moons of other planets for decades now. And it does get a little weird scheduling mission events in Earth-centric time.

    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.

  • Jay (unregistered) in reply to LANMind
    LANMind:
    Nagesh:
    Some inside joke WTF should not be published. I am finding hard to get joke here.

    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.

    Actually, Wyoming is the only entry in that table that IS on a map.

  • Jay (unregistered) in reply to Jeff
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    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.

  • (cs) in reply to Jay
    Jay:
    LANMind:
    Nagesh:
    Some inside joke WTF should not be published. I am finding hard to get joke here.

    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.

    Actually, Wyoming is the only entry in that table that IS on a map.

    I had to take look at Map. Wyoming is not looking like anything of consequence like New York City.

  • John Hensley (unregistered) in reply to Nagesh
    Nagesh:
    I am finding hard to get joke here.
    In WTF codebase, joke gets you!
  • big picture thinker (unregistered) in reply to trtrwtf
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

  • (cs) in reply to Hilarious Dudebro
    Hilarious Dudebro:
    foo:
    Oh boy:
    null:
    TheJonB:
    big picture thinker:
    TRWTF is they forgot:

    "12:01:00" => "12:01 pm" (...) "12:29:00" => "12:29 pm"

    Now do it again and include the seconds or it's not funny.

    Now do it again and include miliiseconds or it's not funny.

    Now do it again and include spider monkeys or it's not funny.

    Now do it again and include nobody expects the Spanish inquisition.
    Now do it again and include boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow.

    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.

  • (cs) in reply to big picture thinker
    big picture thinker:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

    A neat idea, but difficult to calibrate with any degree of exactitude.

  • (cs) in reply to caffeine
    caffeine:
    $times = array( "" => "", "12:00:00" => "beer o'clock", "17:00:00" => "happy hour", "01:00:00" => "last drinks, I'll take a slab to go...", "VB" => "only if you have nothing else");

    "4:30" => "time for Wapner"

  • LANMind (unregistered) in reply to Jay
    Jay:
    LANMind:
    Nagesh:
    Some inside joke WTF should not be published. I am finding hard to get joke here.

    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.

    Actually, Wyoming is the only entry in that table that IS on a map.

    +1

  • eka808 (unregistered)

    $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...

  • eric76 (unregistered)

    He left out the canonical hours of Matins, Lauds, Terce, Sext, None, and Vespers.

  • A Real Einstein (unregistered) in reply to Matt Westwood
    Matt Westwood:
    big picture thinker:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

    A neat idea, but impossible to calibrate with any degree of exactitude.

    FTFY

  • TRWTF Funny Guy (unregistered)

    WY = TIME_NOT_FOUND Is it safe to say that Wyoming is the land that time forgot?

  • configurator (unregistered) in reply to Curry
    Curry:
    Or C#, when declaring lambda functions.
    var rslt = intArray.Select(num => num < limit);

    You could use it to initialize dictionaries as well:

        public class StringDictionary<T> : Dictionary<string, T> {
            public void Add(Func<string, T> data) {
                string key = data.Method.GetParameters().First().Name;
                var value = data(key);
                Add(key, value);
            }
        }
    
                var ints = new StringDictionary<int> { one => 1, two => 2, three => 3 };
                ints.Add(four => 4);
    
    
  • lesle (unregistered)

    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.?

  • (cs) in reply to trtrwtf
    trtrwtf:
    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    Sorry...

    I only deal with stardates. Ahead warp factor 4.

  • (cs) in reply to TRWTF Funny Guy
    TRWTF Funny Guy:
    WY = TIME_NOT_FOUND Is it safe to say that Wyoming is the land that time forgot?

    Almost:

    [image]
  • Zunesize Me! (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Hilarious Dudebro:
    foo:
    Oh boy:
    null:
    TheJonB:
    big picture thinker:
    TRWTF is they forgot:

    "12:01:00" => "12:01 pm" (...) "12:29:00" => "12:29 pm"

    Now do it again and include the seconds or it's not funny.

    Now do it again and include miliiseconds or it's not funny.
    Now do it again and include spider monkeys or it's not funny.
    Now do it again and include nobody expects the Spanish inquisition.
    Now do it again and include boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow.
    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.
    Wow, your son must not have any sensitivity left at all! Truly unfunny. I've only ever managed to include about half of those items.
  • Gunslinger (unregistered) in reply to Kevin S
    Kevin S:
    Don't you get it?

    If the date() function returns Wyoming, it will surely be the end of $times

    At least there was one funny comment here.

  • Agention (unregistered) in reply to lesle
    lesle:
    Those of us weaned before the advent of computers learned, archaically, that noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.

    And now you're wrong, per common (and NIST) convention, and do nothing but to sow confusion amongst all.

  • Fred (unregistered) in reply to TheJonB
    TheJonB:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!

    The only acceptable time format is clearly MM hh ss.

    So 30 6 10 reads "Thirty minutes past six and 10 seconds" like some Americans might say it.

    Nice one. Bet the yankees are really fuming now...
  • Ogstern (unregistered) in reply to Coyne
    Coyne:
    Jeff:
    PedanticCurmudgeon:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!
    Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.
    In a perfect world, there are no time zones.

    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.

    Well, maybe. But it's the only rock we have.

    Yes it is for now. But soon, soon we will have your rock too!!

  • eric76 (unregistered) in reply to lesle
    lesle:
    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.

    As you said, 12 m is noon, not midnight. But I think that it is correct to refer to midnight as either 12 am or 12 pm, your choice. I've heard it used both ways.

    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.

  • eric76 (unregistered) in reply to Agention
    Agention:
    lesle:
    Those of us weaned before the advent of computers learned, archaically, that noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.

    And now you're wrong, per common (and NIST) convention, and do nothing but to sow confusion amongst all.

    Citations, please.

    From http://physics.nist.gov/News/Releases/questions.html:

    Are noon and midnight 12 a.m. or 12 p.m.?

    This is perhaps the trickiest time question of them all. The best answer is that the terms 12 a.m. and 12 p.m. cause confusion and should not be used.

    To illustrate this, consider that "a.m." and "p.m." are abbreviations for "ante meridiem" and "post meridiem." They mean "before noon" and "after noon," respectively. Of course, noon is neither before nor after noon; it is simply noon. Therefore, neither the "a.m." nor "p.m." designation is correct. On the other hand, midnight is both 12 hours before noon and 12 hours after noon. Therefore, either 12 a.m. or 12 p.m. could work as a designation for midnight, but both would be ambiguous.

    To get around the problem, the terms 12 noon and 12 midnight should be used instead of 12 a.m. and 12 p.m. For example, a bank might be open on Saturday from 8 a.m. to noon. Or, a grocery store might be open daily until midnight. If you are making schedules, times such as 12:01 a.m. (one minute after midnight), or 11:59 p.m. (one minute before midnight) also can eliminate ambiguity. This method is used by the railroads and airlines.

  • 1028 (unregistered) in reply to Jay
    Jay:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    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.

    All the people who live in the Northern Hemisphere think that we're upside down, But if you happen to live in the Southern Hemisphere: it's the right way 'round;

    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)

  • dfhaer (unregistered) in reply to eric76
    eric76:
    Agention:
    lesle:
    Those of us weaned before the advent of computers learned, archaically, that noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.

    And now you're wrong, per common (and NIST) convention, and do nothing but to sow confusion amongst all.

    Citations, please.

    From http://physics.nist.gov/News/Releases/questions.html:

    Are noon and midnight 12 a.m. or 12 p.m.?

    This is perhaps the trickiest time question of them all. The best answer is that the terms 12 a.m. and 12 p.m. cause confusion and should not be used.

    To illustrate this, consider that "a.m." and "p.m." are abbreviations for "ante meridiem" and "post meridiem." They mean "before noon" and "after noon," respectively. Of course, noon is neither before nor after noon; it is simply noon. Therefore, neither the "a.m." nor "p.m." designation is correct. On the other hand, midnight is both 12 hours before noon and 12 hours after noon. Therefore, either 12 a.m. or 12 p.m. could work as a designation for midnight, but both would be ambiguous.

    To get around the problem, the terms 12 noon and 12 midnight should be used instead of 12 a.m. and 12 p.m. For example, a bank might be open on Saturday from 8 a.m. to noon. Or, a grocery store might be open daily until midnight. If you are making schedules, times such as 12:01 a.m. (one minute after midnight), or 11:59 p.m. (one minute before midnight) also can eliminate ambiguity. This method is used by the railroads and airlines.

    I reckon he means ytou're wrong saying there is no 12AM, when what you quoted (fairly clearly) explains that 12AM = 12PM = MIDNIGHT

  • Ken B. (unregistered)

    "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."

  • kbiel (unregistered)

    I tell you, nothing good happens after 1830, nothing. And it usually happens in Wyoming.

  • lesle (unregistered)

    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).

  • John (unregistered) in reply to Stev

    TRWTF is Americans don't understand the 24 hour clock while the rest of the world does.

  • hardy (unregistered) in reply to big picture thinker
    big picture thinker:
    TRWTF is they forgot:

    "12:01:00" => "12:01 pm" "12:02:00" => "12:02 pm" "12:03:00" => "12:03 pm" "12:04:00" => "12:04 pm" "12:05:00" => "12:05 pm" "12:06:00" => "12:06 pm" "12:07:00" => "12:07 pm" "12:08:00" => "12:08 pm" "12:09:00" => "12:09 pm" "12:10:00" => "12:10 pm" "12:11:00" => "12:11 pm" "12:12:00" => "12:12 pm" "12:13:00" => "12:13 pm" "12:14:00" => "12:14 pm" "12:15:00" => "12:15 pm" "12:16:00" => "12:16 pm" "12:17:00" => "12:17 pm" "12:18:00" => "12:18 pm" "12:19:00" => "12:19 pm" "12:20:00" => "12:20 pm" "12:21:00" => "12:21 pm" "12:22:00" => "12:22 pm" "12:23:00" => "12:23 pm" "12:24:00" => "12:24 pm" "12:25:00" => "12:25 pm" "12:26:00" => "12:26 pm" "12:27:00" => "12:27 pm" "12:28:00" => "12:28 pm" "12:29:00" => "12:29 pm"

    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-

  • A nony mous (unregistered) in reply to John
    John:
    TRWTF is Americans don't understand the 24 hour clock while the rest of the world does.
    Americans don't need to understand things. Belief and blind faith is all that's required of them.
  • (cs) in reply to Spoe
    Spoe:
    Looks like PHP. I guess "date('g:i a', $seconds_since_epoch);" was too complicated?
    Doesn't handle Wyoming, duh.
  • (cs) in reply to big picture thinker
    big picture thinker:
    TRWTF is they forgot:

    "12:01:00" => "12:01 pm" "12:02:00" => "12:02 pm" "12:03:00" => "12:03 pm" "12:04:00" => "12:04 pm" "12:05:00" => "12:05 pm" "12:06:00" => "12:06 pm" "12:07:00" => "12:07 pm" "12:08:00" => "12:08 pm" "12:09:00" => "12:09 pm" "12:10:00" => "12:10 pm" "12:11:00" => "12:11 pm" "12:12:00" => "12:12 pm" "12:13:00" => "12:13 pm" "12:14:00" => "12:14 pm" "12:15:00" => "12:15 pm" "12:16:00" => "12:16 pm" "12:17:00" => "12:17 pm" "12:18:00" => "12:18 pm" "12:19:00" => "12:19 pm" "12:20:00" => "12:20 pm" "12:21:00" => "12:21 pm" "12:22:00" => "12:22 pm" "12:23:00" => "12:23 pm" "12:24:00" => "12:24 pm" "12:25:00" => "12:25 pm" "12:26:00" => "12:26 pm" "12:27:00" => "12:27 pm" "12:28:00" => "12:28 pm" "12:29:00" => "12:29 pm"

    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.

  • Harrow (unregistered) in reply to dguthurts
    dguthurts:
    Brock Pleatpants:
    You forgot "Beer O'Clock"! Amirite?

    Yes, urite, they sure did.

    And no. It's not needed as it's always "Beer O'clock" somewhere.

    It's certainly always "Beer O'clock" in Wyoming.

    -Harrow.

  • Your Name * (unregistered) in reply to Ken B.
    Ken B.:
    "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."

    $this_thread = array( "you" => "win" );

  • (cs) in reply to big picture thinker
    big picture thinker:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

    Nonexistent?

Leave a comment on “Wyoming O'Clock”

Log In or post as a guest

Replying to comment #:

« Return to Article