Patch 3.0.3 disabled os.time() and other os.* functions. Many addons that use these functions are not functional in patch 3.0.3. This addon emulates os.time() and other functions so that other addons can use these functions as before.
To avoid errors, this addon should be loaded before other addons. This is the reason for the apparently strange folder name. This idea was taken from the addon RestoreAPI by Yathos.
To Addon Authors
You can include this addon as a library to your addon, so that the end users do not have to install this addon separately. Since ver 1.30, this addon first checks if other copies of fix_for_patch303 or d303fix are loaded, and defines os.* functions only when other copies are not found. Thus, you can have multiple copies of this addon safely.
The inclusion of this addon to your addon is simple. Copy fix_for_patch303.lua and fix_for_patch303.xml to your addon's folder and add
as the first line of your addon's toc file.
Then you can use os.time(), os.date() and most of other os.* functions in your addon.
You can find a simple example in Simple Timer.
Frequently Answered Questions and Answers
Can I use both fix-for-patch303 and RestoreAPI?
Yes. I myself am using both with the default folder names as distributed here.
Can I use both d303fix and fix-for-patch303?
I do not recommend to use both, but you can install both. If you install both, the first one to be loaded overrides the latter one.
Should I also update fix-for-patch303 distributed as a library to other addons?
No. When you install this addon separately as a stand-alone addon, it will override all other versions which might be included in other addons.
This addon automatically takes a screenshot every time you log in. This is to get the "real" time, so that os.time() function returns the correct value.
Some addons overwrite some of os.* functions defined in this addon, which might cause unexpected errors.
I would like to thank Yathos for the idea to tweak the folder name, and BrunoPoA for the suggestion on the os.date() function.