Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.1
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
time /
[ HOME SHELL ]
Name
Size
Permission
Action
example_test.go
19.38
KB
-rw-r--r--
export_android_test.go
318
B
-rw-r--r--
export_test.go
3.07
KB
-rw-r--r--
export_windows_test.go
514
B
-rw-r--r--
format.go
41.67
KB
-rw-r--r--
format_test.go
25.38
KB
-rw-r--r--
genzabbrs.go
2.96
KB
-rw-r--r--
internal_test.go
2.45
KB
-rw-r--r--
mono_test.go
7.51
KB
-rw-r--r--
sleep.go
5.08
KB
-rw-r--r--
sleep_test.go
10.73
KB
-rw-r--r--
sys_plan9.go
1015
B
-rw-r--r--
sys_unix.go
1.05
KB
-rw-r--r--
sys_windows.go
996
B
-rw-r--r--
tick.go
1.8
KB
-rw-r--r--
tick_test.go
2.59
KB
-rw-r--r--
time.go
45.56
KB
-rw-r--r--
time_test.go
41.05
KB
-rw-r--r--
zoneinfo.go
8.79
KB
-rw-r--r--
zoneinfo_abbrs_windows.go
10.34
KB
-rw-r--r--
zoneinfo_android.go
2.05
KB
-rw-r--r--
zoneinfo_android_test.go
408
B
-rw-r--r--
zoneinfo_ios.go
1.02
KB
-rw-r--r--
zoneinfo_js.go
1.56
KB
-rw-r--r--
zoneinfo_plan9.go
2.71
KB
-rw-r--r--
zoneinfo_read.go
12.2
KB
-rw-r--r--
zoneinfo_test.go
4.59
KB
-rw-r--r--
zoneinfo_unix.go
1.31
KB
-rw-r--r--
zoneinfo_windows.go
6.68
KB
-rw-r--r--
zoneinfo_windows_test.go
1.9
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : zoneinfo_test.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package time_test import ( "errors" "fmt" "os" "reflect" "testing" "time" ) func init() { if time.ZoneinfoForTesting() != nil { panic(fmt.Errorf("zoneinfo initialized before first LoadLocation")) } } func TestEnvVarUsage(t *testing.T) { time.ResetZoneinfoForTesting() const testZoneinfo = "foo.zip" const env = "ZONEINFO" defer os.Setenv(env, os.Getenv(env)) os.Setenv(env, testZoneinfo) // Result isn't important, we're testing the side effect of this command time.LoadLocation("Asia/Jerusalem") defer time.ResetZoneinfoForTesting() if zoneinfo := time.ZoneinfoForTesting(); testZoneinfo != *zoneinfo { t.Errorf("zoneinfo does not match env variable: got %q want %q", *zoneinfo, testZoneinfo) } } func TestBadLocationErrMsg(t *testing.T) { time.ResetZoneinfoForTesting() loc := "Asia/SomethingNotExist" want := errors.New("unknown time zone " + loc) _, err := time.LoadLocation(loc) if err.Error() != want.Error() { t.Errorf("LoadLocation(%q) error = %v; want %v", loc, err, want) } } func TestLoadLocationValidatesNames(t *testing.T) { time.ResetZoneinfoForTesting() const env = "ZONEINFO" defer os.Setenv(env, os.Getenv(env)) os.Setenv(env, "") bad := []string{ "/usr/foo/Foo", "\\UNC\foo", "..", "a..", } for _, v := range bad { _, err := time.LoadLocation(v) if err != time.ErrLocation { t.Errorf("LoadLocation(%q) error = %v; want ErrLocation", v, err) } } } func TestVersion3(t *testing.T) { time.ForceZipFileForTesting(true) defer time.ForceZipFileForTesting(false) _, err := time.LoadLocation("Asia/Jerusalem") if err != nil { t.Fatal(err) } } // Test that we get the correct results for times before the first // transition time. To do this we explicitly check early dates in a // couple of specific timezones. func TestFirstZone(t *testing.T) { time.ForceZipFileForTesting(true) defer time.ForceZipFileForTesting(false) const format = "Mon, 02 Jan 2006 15:04:05 -0700 (MST)" var tests = []struct { zone string unix int64 want1 string want2 string }{ { "PST8PDT", -1633269601, "Sun, 31 Mar 1918 01:59:59 -0800 (PST)", "Sun, 31 Mar 1918 03:00:00 -0700 (PDT)", }, { "Pacific/Fakaofo", 1325242799, "Thu, 29 Dec 2011 23:59:59 -1100 (-11)", "Sat, 31 Dec 2011 00:00:00 +1300 (+13)", }, } for _, test := range tests { z, err := time.LoadLocation(test.zone) if err != nil { t.Fatal(err) } s := time.Unix(test.unix, 0).In(z).Format(format) if s != test.want1 { t.Errorf("for %s %d got %q want %q", test.zone, test.unix, s, test.want1) } s = time.Unix(test.unix+1, 0).In(z).Format(format) if s != test.want2 { t.Errorf("for %s %d got %q want %q", test.zone, test.unix, s, test.want2) } } } func TestLocationNames(t *testing.T) { if time.Local.String() != "Local" { t.Errorf(`invalid Local location name: got %q want "Local"`, time.Local) } if time.UTC.String() != "UTC" { t.Errorf(`invalid UTC location name: got %q want "UTC"`, time.UTC) } } func TestLoadLocationFromTZData(t *testing.T) { time.ForceZipFileForTesting(true) defer time.ForceZipFileForTesting(false) const locationName = "Asia/Jerusalem" reference, err := time.LoadLocation(locationName) if err != nil { t.Fatal(err) } tzinfo, err := time.LoadTzinfo(locationName, time.OrigZoneSources[len(time.OrigZoneSources)-1]) if err != nil { t.Fatal(err) } sample, err := time.LoadLocationFromTZData(locationName, tzinfo) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(reference, sample) { t.Errorf("return values of LoadLocationFromTZData and LoadLocation don't match") } } // Issue 30099. func TestEarlyLocation(t *testing.T) { time.ForceZipFileForTesting(true) defer time.ForceZipFileForTesting(false) const locName = "America/New_York" loc, err := time.LoadLocation(locName) if err != nil { t.Fatal(err) } d := time.Date(1900, time.January, 1, 0, 0, 0, 0, loc) tzName, tzOffset := d.Zone() if want := "EST"; tzName != want { t.Errorf("Zone name == %s, want %s", tzName, want) } if want := -18000; tzOffset != want { t.Errorf("Zone offset == %d, want %d", tzOffset, want) } } func TestMalformedTZData(t *testing.T) { // The goal here is just that malformed tzdata results in an error, not a panic. issue29437 := "TZif\x00000000000000000\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0000" _, err := time.LoadLocationFromTZData("abc", []byte(issue29437)) if err == nil { t.Error("expected error, got none") } }
Close