influxdata / influxdata/influxdb-java
Is there a way to get QueryResult like 'yyyy-MM-dd HH:mm:ss'?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
Presently the time format of queryResult of rfc3339 is something like `yyyy-MM-dd'T'HH:mm:ssX`, which I excepted was `yyyy-MM-dd HH:mm:ss` like https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/#rfc3339-like-date-time-string.
Using SimpleDateFormat needs two-time converting
```Java
SimpleDateFormat inputSdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
SimpleDateFormat outputSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = inputSdf.parse(dateStr);
String format = outputSdf.format(parse);
```
Is there a way to get like that?
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 by reviewing QueryResult date handling and the Java SimpleDateFormat example in the issue. Determine whether the client can expose the requested `yyyy-MM-dd HH:mm:ss` representation without the caller performing two conversions; done means the supported approach or resulting format is documented and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100