Skip to content

Commit

Permalink
fix time format
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored and Pantani committed Mar 28, 2024
1 parent c2b11ea commit 9413a4b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/widget/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func New() (*Widget, error) {
return widget, err
}
currentTime := time.Now()
if err := widget.time.Write(currentTime.Format("2006-01-02\n22:04:05")); err != nil {
if err := widget.time.Write(currentTime.Format("2006-01-02\n15:04:05")); err != nil {
return widget, err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/widget/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (w *Widget) SetMoniker(text string, opts ...text.WriteOption) error {

// AddTransaction adds a new transaction to the widget.
func (w *Widget) AddTransaction(txt string, opts ...text.WriteOption) error {
now := time.Now().Format("2006-01-02 22:04:05")
now := time.Now().Format("2006-01-02 15:04:05")
if err := w.transactions.Write(
fmt.Sprintf("\n\nNew Transaction (%s)\n", now),
text.WriteCellOpts(cell.Bold(), cell.Inverse()),
Expand Down
2 changes: 1 addition & 1 deletion services/explorer/explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Run(ctx context.Context, host string) error {

client.Callback(ctx, 1*time.Second, func() error {
now := time.Now()
if err := w.SetTime(now.Format("2006-01-02\n22:04:05")); err != nil {
if err := w.SetTime(now.Format("2006-01-02\n15:04:05")); err != nil {
return err
}
secondsPassed := now.Sub(start).Seconds()
Expand Down

0 comments on commit 9413a4b

Please sign in to comment.