summaryrefslogtreecommitdiff
path: root/src/pkg/time
AgeCommit message (Collapse)AuthorFilesLines
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý2-8/+11
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý5-10/+46
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý4-49/+55
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý5-77/+191
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý10-352/+371
2010-06-29time: implement timezones for windowsAlex Brainman4-9/+472
Fixes issue 761. R=PeterGo, adg, rsc CC=golang-dev http://codereview.appspot.com/1121042 Committer: Russ Cox <rsc@golang.org>
2010-04-27time: remove incorrect time.ISO8601 and add time.RFC3339Micah Stetson2-54/+88
Fixes issue 734. R=rsc, r CC=golang-dev http://codereview.appspot.com/975042 Committer: Russ Cox <rsc@golang.org>
2010-04-11time: fix comment typoAndrew Gerrand1-1/+1
R=r CC=golang-dev http://codereview.appspot.com/811044
2010-03-30time: do not segment time strings by character class.Russ Cox3-173/+212
instead use pure substring matching to find template values. this makes stdZulu unnecessary and allows formats like "20060102 030405" (used in some internet protocols). this makes Parse not handle years < 0000 or > 9999 anymore. that seems like an okay price to pay, trading hypothetical functionality for real functionality. also changed the comments on the Time struct to use the same reference date as the format and parse routines. R=r CC=golang-dev http://codereview.appspot.com/833045
2010-03-30single argument panicRuss Cox1-2/+2
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev http://codereview.appspot.com/850041
2010-02-18time.Ticker: fix bug arising when all tickers are dead.Rob Pike2-6/+24
thanks to yglgogo for analysis. Fixes issue 593. R=rsc CC=golang-dev http://codereview.appspot.com/210044
2010-02-04time: Sleep through interruptionsChristopher Wedgwood2-2/+39
R=rsc CC=golang-dev http://codereview.appspot.com/202043 Committer: Russ Cox <rsc@golang.org>
2010-02-04Add RFC822 formats as named constants.Rob Pike3-5/+38
Make sure to print a time zone when formatting even if none is defined. Add a comment introducing lookupTimezone (not lookupTimeZone). Fixes isse 577. R=rsc CC=golang-dev http://codereview.appspot.com/196090
2010-01-29fix bug in tickRob Pike1-4/+5
Fixes issue 576. R=rsc, rog CC=golang-dev http://codereview.appspot.com/196061 Committer: Rob Pike <r@golang.org>
2010-01-29An experimental implemenation of Ticker using two goroutines for all tickers.Rob Pike1-63/+122
Feel free to suggest other approaches. R=rsc CC=cw, golang-dev http://codereview.appspot.com/193070
2010-01-19time: make tick.Stop a little more robustRuss Cox1-6/+30
R=r CC=golang-dev, jackpal http://codereview.appspot.com/186228
2010-01-15fix +0000 time zones.Rob Pike2-4/+32
Fixes issue 527. R=rsc CC=golang-dev http://codereview.appspot.com/186159
2010-01-14clean up handling of numeric time zonesRob Pike2-56/+88
allow formatting of ruby-style times. Fixes issue 518. R=rsc CC=golang-dev http://codereview.appspot.com/186119
2010-01-13don't worry about the number of spaces when parsing.Rob Pike2-11/+48
allow an underscore to stand for a space or digit if the following number is >=10. R=rsc CC=golang-dev http://codereview.appspot.com/186115
2010-01-08Add a parser to the time package, the inverse of time.FormatRob Pike2-1/+345
R=rsc CC=golang-dev http://codereview.appspot.com/183141
2010-01-07make Format about twice as fast by removing allocations, using a bytes.BufferRob Pike2-31/+28
add a benchmark R=rsc CC=golang-dev http://codereview.appspot.com/181164
2010-01-06time: fix Makefile so deps.bash is happy (fixes build)Russ Cox1-1/+1
TBR=r http://codereview.appspot.com/183133
2010-01-07New time formatter, time.Format(formatString)Rob Pike4-155/+259
The model is that formatString is a a representation of a standard time, and that Format converts the time to that representation. Standard representaitons are defined for ANSIC, RFC850, RFC1123, and ISO8601. There's also a humane Kitchen fomat: 3:04PM. R=rsc, benolive, cw CC=golang-dev http://codereview.appspot.com/181130
2009-12-25Update documentation around time.Sleep to specify its precision, and suggestDevon H. O'Dell1-2/+3
a possible interface for more granular sleep times. Fixes issue #260. R=rsc, r CC=golang-dev http://codereview.appspot.com/181058 Committer: Rob Pike <r@golang.org>
2009-12-17time: add ISO 8601 time formatBen Olive2-1/+43
Fixes issue 431. R=r, rsc CC=golang-dev http://codereview.appspot.com/179079 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer6-258/+258
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike1-2/+2
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-12-02time: another bug in SecondsToUTC.Russ Cox2-0/+26
added random test to look for more. Fixes issue 363. R=r, cw http://codereview.appspot.com/163071
2009-12-01time: fix handling of Jan 1 1601, 1201, 801, ...Russ Cox2-6/+7
R=r CC=hurtonm http://codereview.appspot.com/164074
2009-11-24Add benchmarks for commonly used routines.Trevor Strohman1-0/+12
R=rsc, r, r1 http://codereview.appspot.com/160046 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-3/+3
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell1-1/+1
cgo/libmach remain unimplemented. However, compilers, runtime, and packages are 100%. I still need to go through and implement missing syscalls (at least make sure they're all listed), but for all shipped functionality, this is done. Ship! ;) R=rsc, VenkateshSrinivas http://codereview.appspot.com/152142 Committer: Russ Cox <rsc@golang.org>
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer4-49/+49
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer5-43/+43
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer3-24/+8
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt-ify template, time, unsafe, flag, fmtRobert Griesemer1-2/+2
(replacement for CLs 1017039, 1017041, 1017040, 1018054) R=r http://go/go-review/1018060
2009-10-27files that are okay from the last gofmt roundRuss Cox2-4/+4
R=gri http://go/go-review/1015011
2009-10-08more lgtm files from gofmtRuss Cox3-23/+22
R=gri OCL=35485 CL=35488
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox4-132/+125
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
2009-10-06Change description of time.Time.ZoneOffset to specify east is +ve.Adam Langley1-1/+1
Currently, the description says that +ve numbers are westwards of UTC. Typically, timezones are specified with +ve numbers running east of Greenwich. For example, San Francisco is specified as UTC-8. Also, when calling time.Localtime(), the following is returned on my box in PDT: {Year:2009 Month:10 Day:5 Hour:18 Minute:55 Second:6 Weekday:1 ZoneOffset:-25200 Zone:PDT} Note that the ZoneOffset is negative. This leads me to suspect that the description is mistaken. R=rsc APPROVED=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=35356 CL=35377
2009-09-23expand ticker interface to allow a client to shut down a ticker.Rob Pike2-18/+48
existing interface still works. R=rsc DELTA=50 (32 added, 2 deleted, 16 changed) OCL=34930 CL=34932
2009-09-17unused importsRuss Cox2-6/+0
R=r OCL=34731 CL=34731
2009-09-15more "declared and not used".Russ Cox2-2/+2
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox2-5/+5
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-09-14do not crash printing the zero value for time.Time.Russ Cox1-1/+2
R=r DELTA=2 (1 added, 0 deleted, 1 changed) OCL=34605 CL=34608
2009-08-12convert low-level (used by testing) packages toRuss Cox5-76/+11
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-08-10remove unnecessary pkg. referencesRuss Cox2-6/+6
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-08-04get function calls out of the way beforeRuss Cox1-4/+4
allocating registers in shift and div. fix behavior when res == a reserved register. R=ken OCL=32765 CL=32767
2009-06-26Getenv: almost no one wants the error, so make it return a string that may ↵Rob Pike1-1/+1
be empty. Getenverror is the new name for the old routine that returns an error too. R=rsc DELTA=35 (7 added, 7 deleted, 21 changed) OCL=30818 CL=30821