mirror of
https://codeberg.org/scip/ts.git
synced 2025-12-17 12:31:06 +01:00
catch err
This commit is contained in:
@@ -20,6 +20,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@@ -39,7 +40,10 @@ func dateAtTime(dateFrom time.Time, hour int, min int, sec int) time.Time {
|
|||||||
|
|
||||||
func setUTC() {
|
func setUTC() {
|
||||||
// make sure to have a consistent environment
|
// make sure to have a consistent environment
|
||||||
os.Setenv("TZ", "UTC")
|
if err := os.Setenv("TZ", "UTC"); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
loc, _ := time.LoadLocation("UTC")
|
loc, _ := time.LoadLocation("UTC")
|
||||||
time.Local = loc
|
time.Local = loc
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user