
It's Go Time On Linux - jgrahamc
http://blog.cloudflare.com/its-go-time-on-linux
======
chimeracoder
Dealing with time on Go, whether simply unmarshalling string representations
of time or handling timezone/locale converstions, is _so_ incredibly
convenient. Gone are the days when I'd have to remember the difference between
"%MM", "%mm", and "%m".

I have gotten incredibly spoiled in this regard, and it's incredibly painful
now to deal with time in Python or (even worse) Javascript[0].

This isn't even getting at the synchronization/timing features, which Go
provides amazing support for as well.

[0] My jaw hit the floor when I saw how difficult it is to get the name of a
month from a Date object in Javascript:
[https://stackoverflow.com/questions/1643320/get-month-
name-f...](https://stackoverflow.com/questions/1643320/get-month-name-from-
date)

~~~
rquirk
It was one of the things I _hated_ about Go! I am entirely comfortable with
the POSIX-style %Y, %m, etc. formatting and having to learn Go's silly way to
do it annoyed me no end. The documentation should be much more explicit about
what the "reference time" thing means for someone used to strftime.
[http://golang.org/pkg/time/#Time.Format](http://golang.org/pkg/time/#Time.Format)

~~~
chimeracoder
> For more information about the formats and the definition of the reference
> time, see the documentation for ANSIC and the other constants defined by
> this package.

I find the information at [http://golang.org/pkg/time/#pkg-
constants](http://golang.org/pkg/time/#pkg-constants) very explanatory.

What do you think is unclear about the documentation?

~~~
rquirk
I just didn't "get it" as I had no idea what it meant by a reference time.
Normally a time is formatted like %Y-%m-%d and so on, these examples look
nothing like that so I had no idea that 2006 is how they spell %Y, 01 is %m,
02 is %d, etc. If you have grown up with strptime and friends, the Go version
and documentation makes literally no sense. Then it suddenly clicks ("ah! they
do _that_?!") and it is perfectly obvious.

------
jmilkbal
I haven't spent any time looking at Go because I'm pretty satisfied with Ada,
but these libs do smell a bit like the Ada time handling functions which only
get better through each ISO revision. Not handling dates like POSIX is nothing
new, but it some of us just haven't been exposed to it. Of course, Ada would
never _guess_ at a format. Blasphemy. The more you know™

[http://rm.ada.cx/05/RM-9-6.html](http://rm.ada.cx/05/RM-9-6.html)
[http://rm.ada.cx/05/RM-9-6-1.html](http://rm.ada.cx/05/RM-9-6-1.html)
[http://rm.ada.cx/05/RM-D-8.html](http://rm.ada.cx/05/RM-D-8.html)

~~~
herokusaki
You rarely hear about Ada on HN (sadly). What do you use it for?

~~~
jmilkbal
I am a freelance Ada developer who is currently working on a contact
management system for call centers for a small company. It's the usual array
of DB access, webserver and AJAX/websockets. The product is exclusively in Ada
though it relies on Freeswitch currently and has recently allowed some Python
scripting for calls. The front-end is handled by Ada Web Server which is a
rather good Ada HTTP library among other things. Mounds of concurrency and
threading in the product back-end.

[http://libre.adacore.com/tools/aws/](http://libre.adacore.com/tools/aws/)

------
polemic
_" Location contains the timezone information for the time."_

So it should really be _spacetime.HereAndNow_ :P

~~~
ble
spacetime.WhereAndWhen, because you might be representing a time in the past,
somewhere else, and because most timezones aren't UTC. Good job astronomers of
Britain!

------
jaunkst
Ugh.. time, durations and location is enough to make anyone's head spin. Nice
to see how important something so overlooked in many languages is addressed. I
haven't personally had the opportunity to play with go but I like what I see.

------
emersonrsantos
Waiting for the GoFY release.

~~~
aray
I'm not sure if this is a joke. None of us have done any work on this for
years (yeah, somehow I'm a maintainer for it).

I've gotten go to run on baremetal systems since then, and there have been
other operating systems attempts (not to mention rsc's original kernel in go).

What exactly are you looking for?

