Multi-OEM/Retail Project {MRP} - Mk3

Discussion in 'MDL Projects and Applications' started by mxman2k, Oct 15, 2016.

  1. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Lets see which results in English True or False :p

    Copy/paste into a cmd prompt (not needed to be admin)

    Code:
    Powershell -NoProfile "(Get-Date).IsDaylightSavingTime()"
    Code:
    Powershell -NoProfile "[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; (Get-Date).IsDaylightSavingTime()"
    I get:
    Code:
    C:\Users\Dell\Desktop>Powershell -NoProfile "(Get-Date).IsDaylightSavingTime()"
    False
    
    C:\Users\Dell\Desktop>Powershell -NoProfile "[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; (Get-Date).IsDaylightSavingTime()"
    False
    
    C:\Users\Dell\Desktop>
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,581
    1,583
    150
    Both of them return false on my laptop:) Of course DST is enabled
     
  3. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    #7663 mxman2k, Nov 9, 2021
    Last edited: Nov 9, 2021
    (OP)
    so it proves that the darling m$ powershell isn't that good either.. I wonder what else it gets wrong :D :g:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Here in Britain we no longer in daylight saving (British Summer Time as we call it) so i will always get a false response now.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    I do notice on the log you shown that it has the BIAS +1 which i believe is correct for the plus 1 hour daylight change there ?

    So using basic batch script's TZ Util and Reg queries at least that bit is probably right :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Will have to leave it as it is for now because if i start messing about then it could totally screw up the results.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,581
    1,583
    150
    Oh yea it says Bias +1 so I guess it works? :p Yea we're +1 up here..
     
  8. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    The match between P/Shell and non P/S tools for daylight saving mode results in:

    batch 1 -- PS zero :D:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,708
    340
    How about this?
    Code:
    Powershell -NoProfile "([TimeZoneInfo]::Local).IsDaylightSavingTime([DateTime]::Now)"
     
  10. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Don't m$ like to drag the crap out of ps etc commands, gez you get examples which i used before and they not work, so there is another part to it that takes even more reading up and testing out.

    Give us WMIC back you basterds :D:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,197
    90,708
    340
    You know, a lot of HP and Dell update packs/drivers use wmic too

    they should revolt :p
     
  13. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    I can foresee a lot of OEM's complaining, more the smaller ones as they have to re-write all their tools etc, ok in some instances the bloatware stuff isnt going to be missed, but the actual useful tools (few i agree but there are some gems around) will be missed...

    I believe one of the GigaByte BIOS tools uses WMIC :eek: (that may of changed now as it was a few years ago), i know as i had to contact them about a screwed bios issue (their side !!) , the CPU was being reported wrong. They fixed it but the tool they sent me to test used wmic in the batch file it came with!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,581
    1,583
    150
    False :p
     
  15. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    :D:D as i had expected :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    #7676 mxman2k, Nov 9, 2021
    Last edited: Nov 9, 2021
    (OP)
    QT 118 BC4 uploaded for testers :)

    Added in the isDaylight... PShell bit -- even though it not appear to be working as expected in some regions.... Blame m$ for that :D

    Hopefully have now sorted that 'y' type character in the VRam section.. Had to do a bit of a workaround but it seems to work when i manually put the character in as a forced test... :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    QT 118 BC5 uploaded for testers :)

    Thanks to @abbodi1406 for the scripting help, i am still learning new things :D:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,302
    20,985
    210
    Looks ok, that y character gone :) - although it seems like the replace with , (comma) not work on your language but the space is far better than that odd character :D

    Product : Sneezy_WC :rofl: Someone at Acer got a sense of humour :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,766
    7,697
    210
    A general question regarding DST. In my opinion, the False is correct. Don't do the functions simply return if DST is currently in effect, not if the setting is enabled? DST ended here end of October, so, I absolutely expect IsDayLightSavingTime being False.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...