Comments (2)
time.go has
const ISO8601 = "2006-01-02T15:04:05.000Z"
will it always be at a higher time percision? In which case
const ISO8601 = "2006-01-02T15:04:05.000000Z"
although i think it's no longer ISO8601 then, and i'm not sure what the format name is.
but it sounds like instead that it's back and forth, in which case
`func parseTimestamp(ts string) (time.Time, error) {
layouts := []string{
"2006-01-02T15:04:05.000Z",
"2006-01-02T15:04:05.000000Z",
// Add more layouts if necessary...
}
var parsedTime time.Time
var err error
for _, layout := range layouts {
parsedTime, err = time.Parse(layout, ts)
if err == nil {
return parsedTime, nil
}
}
return time.Time{}, fmt.Errorf("timestamp (%s) did not match any known layouts", ts)
}
`
should sort it out? Calling it in the indexPost func with
ts, err := parseTimestamp(rec.CreatedAt)
I can send a pr, but i'm not sure how exactly you want it to operate here.
from indigo.
it could also be that since i don't understand the requirements, that dropping digits as you suggested is actually the correct solution.
from indigo.
Related Issues (20)
- brainstorm: package refactoring HOT 1
- handling typed identifier strings HOT 1
- legacy blob parsing broken
- lexgen: optional query params for concrete types (bool, integer)
- cborgen: support nullable booleans
- lexgen+cborgen: support arrays-of-arrays
- cborgen: support for 'float' types
- gosky: bsky.RepoGetRecord return 400 Bad Request
- indigo: followsAddCmd return XRPC ERROR 400: 400 Bad Request HOT 2
- How do we use ./cmd/gosky to do things like log in and post? HOT 1
- Some of my posts don't decode HOT 8
- HACKING.md needs to be updated
- pipeline event stream playback
- atproto.RepoDescribeRepo fails with a decode error for did:plc:wflozfzpewefv46qof26vbzm HOT 3
- Integration tests need randomly assigned ports
- BGS: transport compression for non-trivial CAR files
- Missing GraphGetBlocks function HOT 4
- `events.ConsumerPool` observability improvements
- search links in link cards and facets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indigo.