Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unix = {};
- function Unix.Decrypt(str)
- return os.date("%c", str);
- end
- function Unix.Encrypt(tbl)
- return os.time(tbl);
- end
- -- Example of Unix.Decrypt:
- unix = Unix.Decrypt(1297694343);
- Dialog.Message("Unix decryption", unix);
- -- Output: 02/14/11 15:39:03
- -- Example of Unix.Encrypt:
- tblDate = {year=2011, month=02, day=20, hour=17, min=36, sec=20};
- unix = Unix.Encrypt(tblDate);
- Dialog.Message("Unix encryption", unix);
- -- Output: 1298219780
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement