summaryrefslogtreecommitdiff
path: root/libgo/go/time/zoneinfo_plan9.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/time/zoneinfo_plan9.go')
-rw-r--r--libgo/go/time/zoneinfo_plan9.go23
1 files changed, 7 insertions, 16 deletions
diff --git a/libgo/go/time/zoneinfo_plan9.go b/libgo/go/time/zoneinfo_plan9.go
index 577ef85bd68..38aefc7a977 100644
--- a/libgo/go/time/zoneinfo_plan9.go
+++ b/libgo/go/time/zoneinfo_plan9.go
@@ -6,11 +6,10 @@
package time
-import (
- "os"
- "strconv"
- "strings"
-)
+//import (
+// "strconv"
+// "strings"
+//)
func parseZones(s string) (zt []zonetime) {
f := strings.Fields(s)
@@ -49,7 +48,7 @@ func parseZones(s string) (zt []zonetime) {
return
}
-func setupZone() {
+func initLocal() {
t, err := os.Getenverror("timezone")
if err != nil {
// do nothing: use UTC
@@ -58,16 +57,8 @@ func setupZone() {
zones = parseZones(t)
}
-func setupTestingZone() {
- f, err := os.Open("/adm/timezone/US_Pacific")
- if err != nil {
- return
- }
- defer f.Close()
- l, _ := f.Seek(0, 2)
- f.Seek(0, 0)
- buf := make([]byte, l)
- _, err = f.Read(buf)
+func initTestingZone() {
+ buf, err := readFile("/adm/timezone/US_Pacific")
if err != nil {
return
}