epam / epam/parso

Different timestamp formats parsing issue

Open
#89 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
79
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Hi, I am trying to parse a sas file with timestamps, but I am unable to get correct time part of the timestamp. I was checking the source code, and for every timestamp format, column schema object return ```DATETIME_FORMAT_STRINGS.DATETIME```. I also have a date with that format, but even that dates time part is parsed incorrectly. Attached are the used csv and created sas7bdat file via sas studio.
**Issue**
My Date - 13 May 1995 08:30:12
Date object from readNext() - Sat May 13 14:00:12 IST 1995
Parsed object as per format - 13May1995:14:00:12.00

How to recreate this bug?
- Parso v2.0.13
- Use timeSimple.sas7bdat
- Simple reader, no encoding
- Date formatter code
`new SimpleDateFormat(format).format((Date) object)`

The timestamp is created correctly from imported csv, see screenshot
![issueTimestamps](https://user-images.githubusercontent.com/85625518/121473678-a8654b00-c9e0-11eb-9f1f-50ba041217f6.png)

Files
[timeSimple.zip](https://github.com/epam/parso/files/6628718/timeSimple.zip)

Version.
Parso - 2.0.13
Java - v8

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.