-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【MYSQL】date issue with 0001-01-01 #157
Comments
Hello, @gotokatsuya
|
@hiroyuki-sato Thank you for comment. You are right, but all data or environment is UTC. For example, I create
I would not use it ! It should be I think this is caused by Gregorian. We can close issue if not have solution. |
Hello, @gotokatsuya Have you ever tried the I suspect that your Embulk execution host doesn't use UTC timezone.
embulk-input-jdbcのMySQLプラグインで9時間時間がずれる (Japanese)
I don't know what this means. Does |
Hi, I find a similar issue. input: The difference seems to occur in DateColumnGetter. embulk-input-jdbc/embulk-input-jdbc/src/main/java/org/embulk/input/jdbc/getter/DateColumnGetter.java Lines 25 to 28 in 10840d3
I try it with simple codes, and reproduced. import java.time.Instant;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class timeParseTest {
public static void main(String[] args) {
String target = "0001-01-01 00:00:00";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try{
Date rslt = sdf.parse(target);
System.out.println(rslt);
System.out.println(rslt.getTime());
// 0000-12-30T00:00:00Z
System.out.println(Instant.ofEpochMilli(rslt.getTime()));
} catch(ParseException e){
e.printStackTrace();
}
}
} |
Hello, @aca-ta If you can read an article in Japanese, please read this page. 西暦1年は閏年か? If you use If you want to use |
Hello @hiroyuki-sato |
I create one table and test.yaml to try using embulk run.
Then, use embulk run
Result
I think result is not correct. Do you have any solution or idea ?
I would not like to use column_options if possible.
The text was updated successfully, but these errors were encountered: