Commit Graph

4 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen f31dc0aaab
Adjust timezone logic
This commit adjusts the previous commit re. the new `ToTimeInDefaultLocationE` and related functions.

The functional change is that we don't default to any location if not provided from the caller.
This is in line with how `ToTime` worked before we started this, and even if the default behaviour may look weird in some cases, it will not break anything.

Most applications will want to use the new *InDefaultLocation functions and decide which default location to use:

```go
loc := time.Local
if config.Location != "" {
    loc = time.LoadLocation(config.Location)
}

t, err := StringToDateInDefaultLocation("2019-01-01", loc)

```

This commit also configure Travis to test on OSX and Windows in addition to Linux.
2019-05-31 17:19:31 +02:00
Bjørn Erik Pedersen c01685bb84 travis: Only check gofmt on Go 1.12 2019-05-31 11:32:28 +02:00
Cameron Moore df9611b942 Refactor tests to get full coverage
Test coverage goes from 75.6% to 100%
2017-03-03 19:55:50 +01:00
Cameron Moore 10b6280cf2 Add Makefile 2017-03-03 15:54:19 +01:00