Open dillbyrne opened 10 years ago
Some date integer functions were originally included in the spoofing but they were dropped as they were causing page timeouts. Date locale strings will need to be set using the language headers for all the spoffed attributes to match. The selection of the time zone abbreviation is currently randomly selected when a timezone has been chosen. This could be improved to allow users to select the abbreviation in addition to the timezone.
During research I noticed the date strings are presented differently across different platforms such. This will have to be accounted for when spoofing.
Time based fuctions such as getHours() need to be spoofed in such a way as to not break functionality like the previous version. Moving the date/time spoofing logic into the inject script will probably address the breakage as the functions will return updated but spoofed data each time they are called.
I downloaded the source code from you and edited the timezone abbreviations as on windows tzutil timezones. It would be nice if you could add instead of the timezone hours in addon itself to country wise when changing timezone from firefox. I can send you the section I have edited and see if it has issues or not
Hi @bodaa . Do you mean the corresponding list items for the dropdown menu ? . Send me what you have and I'll get back to you when I get a chance.
One issue with that approach could be that multiple countries share timezones so for the entry which one do you pick. Another issue is that country timezones may not be that obvious to users where are numbers are, at least for languages that use 0-9.
In any case we could at the very least add a wiki entry for each time with corresponding countries.
Hi! And what exactly does RAS change when changing timezone offset? Thanks.
This is from Windows 10 running Firefox 53.0 (64-bit):
Time and date Fri Apr 21 2017 13:55:05 GMT-0700 (Pacific Standard Time) GMT'ed Fri, 21 Apr 2017 20:55:05 GMT Locale String 4/21/2017, 1:55:05 PM Time-Zone offset 420 minutes Milliseconds since January 1, 1970 1492808105000 Internet Beat @ 913 Time on browserspy.dk server Fri, 21 Apr 2017 15:54:18 -0500 Time on your PC 4/21/2017, 1:55:05 PM Difference between server and PC time 47 seconds
Currently only the time zone offset is spoofed.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toGMTString https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString