giuse88 / duka

duka - Dukascopy historical data downloader
http://giuse88.github.io/duka
MIT License
302 stars 135 forks source link

GMT vs Local time #18

Open fsnlarson opened 7 years ago

fsnlarson commented 7 years ago

screen shot 2016-10-07 at 3 20 01 pm

This should be an option for the CLI tool perhaps since it's possible in the web GUI?

giuse88 commented 7 years ago

true. I am using UTC time in duka, I can look into implementing it ;)

kavuraki commented 7 years ago

Many thanks for the tool. Any possible progress on this?

giuse88 commented 7 years ago

I haven't started working on it yet. I am planning to fix these issues in a week ;) I've been quite busy recently :(

giuse88 commented 7 years ago

@gobbluth @kavuraki What do you think if I add a new command line option like :

--local-time          use local time (default GMT)
giuse88 commented 7 years ago

Check out Pull request : #19

I am converting the timestamp to the local timezone. Is this what you want?

kavuraki commented 7 years ago

@giuse88 So in this case can I enter the local timezone manually?

giuse88 commented 7 years ago

@kavuraki No, if you select local, it converts the timestamp to your local timezone.

kavuraki commented 7 years ago

@giuse88 that's great. It works for me!

giuse88 commented 7 years ago

@kavuraki Cool! Do you think you can try the code in this branch? It works for me but I live in the GMT timezone. Thus, there is no difference between GMT and local. Testing timezone is quite annoying, if it works for you, I will release it today.

kavuraki commented 7 years ago

@giuse88 what should I set for the variable? nothing? is it "True"?

duka EURUSD -s 2016-10-15 -e 2016-11-28 -c D1 --local-time
giuse88 commented 7 years ago

@kavuraki That should just work! It s a boolean value

kavuraki commented 7 years ago

@giuse88 D1 data still start from 03:00 since I live in UTC+3

Maybe it's not the place btw I get csv files one empty row between each rows.

giuse88 commented 7 years ago

Can you upload the file here? You're getting the same data you would get without local-time. The only difference is that now the data timestamp is converted to your local time. Is this what you wanted?

kavuraki commented 7 years ago

In this case I got confused. Cause I notice that some days are twice in the table.

duka EURUSD -s 2016-10-15 -e 2016-11-28 -c D1

duka EURUSD -s 2016-10-15 -e 2016-11-28 -c D1 --local-time

Please find attached output files for the commands above.

outputs.zip

From Dukascopy If I select "local" the day starts from 0:00 (it's 21:00 in UTC which is 0:00 in UTC+3)

giuse88 commented 7 years ago

@kavuraki Thanks for your help. ;) I am looking into it..

giuse88 commented 7 years ago

Yes, I identify the problem you are having. It's caused by daylight time change :( ... It is not related to the local change I made. However, I am not satisfied with the local change. A proper change requires a big refactor and I have no time right now, so I am going to revert this change and merge the rest.

taewookim commented 7 years ago

Any updates on this?