Assigning Date$/Time$ does not wotk - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Assigning Date$/Time$ does not wotk (/showthread.php?tid=3010) Pages:
1
2
|
Assigning Date$/Time$ does not wotk - eoredson - 09-07-2024 Hi, Its nice that you can now assign values to Date$ and Time$ such as: Code: (Select All)
But they don't seem to do anything... Erik. RE: Assigning Date$/Time$ does not wotk - TerryRitchie - 09-07-2024 You can't override the OS's date and time functions. This worked back in the DOS/Win95/98 days, won't work in NT. Same goes for Linux. All kinds of strange and unfortunate things would happen if you were able to this. Certificates would fail, Updates would fail, AV software would freak, chaos would ensue. RE: Assigning Date$/Time$ does not wotk - eoredson - 09-07-2024 That's strange because I just wrote the following code which works and changes the system date and time: Erik. RE: Assigning Date$/Time$ does not wotk - SMcNeill - 09-07-2024 Problem solved. It works! Yay! RE: Assigning Date$/Time$ does not wotk - SMcNeill - 09-07-2024 Did you forget, you solved this already? https://qb64phoenix.com/forum/showthread.php?tid=2060&pid=20362#pid20362 RE: Assigning Date$/Time$ does not wotk - TerryRitchie - 09-07-2024 ??? Ok, how was this sorcery performed? ??? RE: Assigning Date$/Time$ does not wotk - SMcNeill - 09-07-2024 Code: (Select All) ' some code to attempt to change the system date. Compile, Run as Admin. Lasts X seconds until system sync occurs on the net. Unplug your internet connection when trying it, I guess. RE: Assigning Date$/Time$ does not wotk - Pete - 09-07-2024 It's a temp thing these days, because MS control your life. So if you want to change the date and time about all it's good for is creating or saving a program with a manipulated date and time stamp. Oh, and of course time travel. Look, it's 1992 again! Pete - Win 3.1 Forever! Edit: On another note of interest, why can't the boneheads who sync the time function get it right? The older a system becomes, the more minutes your system clock goes off. Mine is 10 minutes behind. RE: Assigning Date$/Time$ does not wotk - SMcNeill - 09-07-2024 (09-07-2024, 08:57 PM)Pete Wrote: It's a temp thing these days, because MS control your life. So if you want to change the date and time about all it's good for is creating or saving a program with a manipulated date and time stamp. Oh, and of course time travel. Look, it's 1992 again! If you go into the registry, hunt for: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\W32Time\TimeProviders\NtpClient. Right click on the SpecialPollInterval key, then click Modify. That's the time -- in seconds -- between when syncing happens. You can set the date for 01-01-0001, and it won't matter. In XXXXX number of seconds, you'll sync and reset the time, or else a vast majority of windows based software won't work properly anymore. If you want to disable time syncing, simply go into Firewall and Disable UDP port 123 -- that's the one which Network Time Protocol uses to connect and sync times with. (NTP Services) So ... 1) block UDP port 123 2) compile my code above 3) run as admin 4) change your time OR.. 1) Change it via Windows, like most normal folks would. And if looking at the above doesn't make folks realize WHY QB64 doesn't perform such actions, I dunno what to tell ya. Personally, I don't think I'd want a basic programming language, or a 1-line command, screwing with such deeply embedded policies and settings and such on my stuff. RE: Assigning Date$/Time$ does not wotk - Pete - 09-08-2024 Windows really cracks me up. So I go into the time settings. The sync has always been on, but get this. The last time the clock was synced was in October, 2019! I'm really surprised the programmers didn't include a feedback loop so at reasonable time intervals the system checks its time with its time servers time when you go online, and sync itself, if necessary. Decent link to changing your time setting via Windows: https://www.youtube.com/watch?v=9IW1b-fCx2U Pete - If Windows made boats they would sync themselves. |