WLua: Handle LUA error with %Z date format on Windows #950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across an error using the Wireshark dissector on Windows, with messages containing unix time in μs.
The %Z date formatter should give the timezone as a short name, but it is not working on Lua 5.2.4 on Windows - as currently used in Wireshark. It worked on Linux, and is already fixed in Lua 5.3.3 or later, which I believe Wireshark will switch to at some point.
I have added code to the generator to catch the error, and if it occurs will instead use "%z" - which gives timezone as an offset instead.
So Windows users will see something like:
When Wireshark is updated to use a newer Lua, it will give something like this (as Linux users see already):
Tested on my Windows setup, and the error is gone, and output as shown.