maciakl / MarkdownJournal

Plain text journaling with Markdown and Dropbox on the Sinatra platform.
http://markdownjournal.com
46 stars 7 forks source link

Timezone setting not working #14

Closed kkebel closed 8 years ago

kkebel commented 9 years ago

Hello Thanks for making this journalling tool available. Works great! One issue I am having is with the timezone setting. I have changed it as per instructions and file is in the same folder as the journals. I tried with config.yml, config.yaml but to no avail. It seems like my entire config file is being ignored as even changes to the heading tag are not being recognized. Anyway, attached is my config file and screen shots showing where the file resides. I am using Ubuntu 14.0 but have noticed the same on my Surface tablet. Any thoughts on what I am doing wrong?

Attaching two screen shots. One shows the file path for the config file and my current time (top right) and the other shows the journal entry which is always defaulting to EST. I am on PST. selection_001 selection_002

Thank You! Raj

maciakl commented 9 years ago

Thanks. I'm looking into it. It seems to be working on my end, but then again that does not mean it works everywhere.

Please be aware that the timezone and heading settings only affect the new entries that are created afterwards. Basically the config file affects how the new entries are posted, but when I render a stored Markdown file I just display it as is. I don't parse the headings and re-code them in the new timezone at the moment. Mainly because it would create a miss-match between the text as it was stored, and as it is being displayed on the page, which may get confusing if you want to manually fix an entry later on. Plus, it is a non-trivial hack to implement.

I should probably mention this in the documentation.

To see if the the config file works, please try the following:

Make a new entry. It should have current time in EST timezone.

Next create a config.yml file with contents like:

timezone: America/Los_Angeles

Then, post a new entry. The newly posted entry should have PST timezone.

Seems to work fine on my end:

selection_001

The daily and month headings will stay the same on old entries, but should switch to the new style one next day/month as appropriate.

I hope that helps. If you are still having issues having it recognize the config file, could you please attach it, so I can test it?

Thanks.

kkebel commented 9 years ago

Luke Thanks for getting back. I tried all these things but nothing worked. However, I did figure out the issue and it was my fault. I had Los_Angeles spelled with a lower case 'a'. That was what was causing it to not recognize my time zone preference. My apologies for wasting your time but I appreciate you getting back.

Thanks!

On Mon, Nov 16, 2015 at 6:57 AM, Luke Maciak notifications@github.com wrote:

Thanks. I'm looking into it. It seems to be working on my end, but then again that does not mean it works everywhere.

Please be aware that the timezone and heading settings only affect the new entries that are created afterwards. Basically the config file affects how the new entries are posted, but when I render a stored Markdown file I just display it as is. I don't parse the headings and re-code them in the new timezone at the moment. Mainly because it would create a miss-match between the text as it was stored, and as it is being displayed on the page, which may get confusing if you want to manually fix an entry later on. Plus, it is a non-trivial hack to implement.

I should probably mention this in the documentation.

To see if the the config file works, please try the following:

Make a new entry. It should have current time in EST timezone.

Next create a config.yml file with contents like:

timezone: America/Los_Angeles

Then, post a new entry. The newly posted entry should have PST timezone.

Seems to work fine on my end:

[image: selection_001] https://cloud.githubusercontent.com/assets/189576/11184935/498f41c0-8c48-11e5-95f6-a90c5c264e95.png

The daily and month headings will stay the same on old entries, but should switch to the new style one next day/month as appropriate.

I hope that helps. If you are still having issues having it recognize the config file, could you please attach it, so I can test it?

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/maciakl/MarkdownJournal/issues/14#issuecomment-157058416 .