fsphil / fswebcam

A neat and simple webcam app
http://www.sanslogic.co.uk/fswebcam/
GNU General Public License v2.0
416 stars 87 forks source link

Unable to set locale for timestamp #15

Closed zoltan-fedor closed 9 years ago

zoltan-fedor commented 9 years ago

Hi, I'm trying to set a non-English (Hungarian) locale for the timestamp, when the timestamp displays the weekday. Even when the linux locale is set to Hungarian, so the "date" command in command line shows the weekdays in Hungarian the timestamp in fswebcam keep using the English locale.

Any idea to force a locale or get fswebcam to use the system default?

Thanks

fsphil commented 9 years ago

I had assumed (and the man page says) that strftime() would use whatever locale LC_TIME was set to. I've done a few tests and I wasn't able to get it working either. Will have to dig a bit more.

zoltan-fedor commented 9 years ago

Thanks for confirming, so it wasn't just me who couldn't figure it out. Please let me know if you find something. It is not a major bug, but it would be nice if we could somehow set the locale.

fsphil commented 9 years ago

Ah seems I have to call setlocale() or it defaults to the generic C locale. I've pushed the change to github, are you able to test?

zoltan-fedor commented 9 years ago

Tested, still doesn't work. I am using Raspbian, pulled it down and recompiled, but still not picking up the locale, still showing the English weekday and not the Hungarian.

zoltan-fedor commented 9 years ago

Apologies, it works now! It seems I had to do a full reboot for some reason.