[BUG] Unixtimestemp in string
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 337
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
panic: 2> unable to parse date: 1600285405
Code for reproduction:
https://play.golang.org/p/yyxxFcFhQg1
package main
import (
"fmt"
cast "github.com/spf13/cast"
)
func main() {
val, err := cast.ToTimeE(1600285405)
if err != nil {
panic(fmt.Sprintf("1> %v", err))
}
fmt.Println(val)
val, err = cast.ToTimeE(fmt.Sprintf("%v", 1600285405))
fmt.Println(val)
if err != nil {
panic(fmt.Sprintf("2> %v", err))
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Go playground reproduction and trace the ToTimeE entry point for numeric and string inputs. Compare how each input is parsed, then verify that a Unix timestamp supplied as a string behaves consistently with the numeric value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100