Skip to content

Commit

Permalink
Add info in README about timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
printesoi committed Mar 30, 2024
1 parent 60c1376 commit fee4f72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ if err != nil {
}
```

### Time and dates in Romanian time zone ###

E-factura APIs expect dates to be in Romanian timezone and will return dates
and times in Romanian timezone. This library tries to load the
`Europe/Bucharest` timezone location on init so that creating and parsing dates
will work as expected. **The user of this library is responsible to ensure the
`Europe/Bucharest` location is available**. If you are not sure that the target
system will have system timezone database, you can use in you `main` package:

```go
import _ "time/tzdata"
```

to load the Go embedded copy of the timezone database.

### Upload invoice ###

```go
Expand Down
2 changes: 1 addition & 1 deletion xml_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

var (
// RoZoneLocation is the Romanian timezone location loaded in the init
// function. This library does not load the time/tzdata package for the
// function. This library does NOT load the time/tzdata package for the
// embedded timezone database, so the user of this library is responsible
// to ensure the Europe/Bucharest location is available, otherwise UTC is
// used and may lead to unexpected results.
Expand Down

0 comments on commit fee4f72

Please sign in to comment.