Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelVallenet committed Nov 25, 2024
1 parent 67cf3eb commit a025451
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contribs/gnodev/cmd/gnodev/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func execDev(cfg *devCfg, args []string, io commands.IO) (err error) {
}
defer devNode.Close()

nodeLogger.Info("node started", "lisn", devNode.GetRemoteAddress(), "chainID", cfg.chainId)
nodeLogger.Info("node started", "lisn", devNode.GetRemoteAddress(), "chainID", cfg.chainId, "chainTz", cfg.chainTz)

// Create server
mux := http.NewServeMux()
Expand Down
10 changes: 4 additions & 6 deletions examples/gno.land/r/demo/timetest/test.gno
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package timetest

import (
"std"
"time"
)

func Render(path string) string {
location, _ := time.LoadLocation("America/New_York") // Replace with your desired timezone
// Create a specific time in that timezone
year, month, day := 2024, time.November, 25
hour, minute, second := 15, 30, 0
nyTime := time.Date(year, month, day, hour, minute, second, 0, location)
time2 := time.Now()
tz := std.GetChainID()

return nyTime.String()
return time2.String() + " | " + tz
}
2 changes: 1 addition & 1 deletion gno.land/pkg/sdk/vm/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vm
import "github.com/gnolang/gno/tm2/pkg/sdk"

const (
chainTzParamPath = "gno.land/r/sys/params.chain.tz.string"
chainTzParamPath = "gno.land/r/sys/params.chain_tz.string"
)

func (vm *VMKeeper) getChainTzParam(ctx sdk.Context) string {
Expand Down

0 comments on commit a025451

Please sign in to comment.