News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

German Time with German Text

Started by herge, August 25, 2013, 08:22:03 PM

Previous topic - Next topic

herge


Hi Rubber Duck German Time fans:

After looking at the documention I found that a Zero Arguement meant
Local Time, which I did not want?
We do a bit of cheating we ask for UTC i e London England i e United Kingdom
Time. We add one to get German or French Time i e Continental Europe Time.
So with out further delay here is GERMAN.ASM

; GERMAN.ASM Tuesday, November 15, 2011 5:21:50 PM
; Sunday, August 25, 2013 5:58:55 AM
include \masm32\include\masm32rt.inc

.data
dtbuf db 260 dup(0)
      db 0
stm     SYSTEMTIME<>
AppName db "Date & time in Germany", 0
crlf db 13, 10, 0
.code
public  germdt
germdt proc
      invoke GetSystemTime, addr stm; get UTC
      mov   ax, word ptr stm.wHour
      inc   ax; Make GMT + 1 i e German Time
      mov word ptr   stm.wHour, ax
      invoke GetDateFormat, 1031, DATE_LONGDATE, 0, 0, addr dtbuf, SIZEOF dtbuf
mov esi, offset dtbuf
      add esi, eax
      mov   byte ptr [esi-1], " " ; replace null with space
      invoke GetTimeFormat, 1031, 0, addr stm, 0, esi, 40
      mov   esi, offset dtbuf 
invoke MessageBox, 0, addr dtbuf, addr AppName, MB_OK
exit
      ret
germdt endp
      END germdt


Microsoft can speak German what have the Germans done
to deserve this.

Have a nice day please?

Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

herge


Hi:

We do not check if the hour might be 24, I do not knew what happens when it
get to 25 but I suspect something goes boom and we have an exception and
we send a message to Redmond where MicroSoft is located on west coast
of America in Washington State.

Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

dedndave


Gunther

Quote from: dedndave on August 25, 2013, 09:24:14 PM
Deutschland Time: 0Beer:30

:P

It's well after midnight.  :lol: :lol: :lol:

Gunther
You have to know the facts before you can distort them.

herge

#4
 Hi Gunther;

I have been to Homewood CANADA's primier Spin Dry i e a Detox or drunk tank.
The insurance company sent me there so there had the priviledge for paying for
my visit. I stayed in Guelph @ 150 Delhi Street. It only costs $182 a day. i e
Province of Ontario cost per day. I was only here for 84 days i e i did three
twenty-eight day sessions. The insurance Company shelled out get this
$15,288 CDN dollars. I am Not a Cheap drunk, I am a bloody expensive drunk!
So there!
Best of all Guelph is only 15 miles from Kitchener, Ontario.
You either like Homewood or you hate it or there kick you out?
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

herge


Hi DednDave:
Since Beer has come up we could call it BST not British Summer Time but
BEER STANDARD TIME. DST Dueschland Standard Time or Berlin Standard Time
or Bonn Standard Time just a few after no beers at ALL. I used to drink or
guzzle Labbat's 50 by the case. 24 in a case. Now gone up to 28 in the case.
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

herge


Hi Gunther:

From Google Translate i e Date Time I Get Datum Uhrzeit
but I would check it sometimes the translation is a dirty word?
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

herge


Hi Gunther & DednDave:

I lost the time for a moment but it came back I did  not
make any changes so I dont knew what happened?
i e 06:00:00 the time was lost now it's back.

; GERMAN.ASM Tuesday, November 15, 2011 5:21:50 PM
; Sunday, August 25, 2013 10:34:14 PM
include \masm32\include\masm32rt.inc

.data
dtbuf db 260 dup(0)
      db 0
stm     SYSTEMTIME<>
AppName db "Datum & Uhrzeit-Date & time in Bonn", 0
crlf db 13, 10, 0
.code
public  germdt
germdt proc
      invoke GetSystemTime, addr stm; get UTC
      mov   ax, word ptr stm.wHour
      inc   ax; Make GMT + 1 i e German Time
      mov word ptr   stm.wHour, ax
      invoke GetDateFormat, 1031, DATE_LONGDATE, 0, 0, addr dtbuf, SIZEOF dtbuf
mov esi, offset dtbuf
      add esi, eax
      mov   byte ptr [esi-1], " " ; replace null with space
      invoke GetTimeFormat, 1031, 0, addr stm, 0, esi, 40
      mov   esi, offset dtbuf 
invoke MessageBox, 0, addr dtbuf, addr AppName, MB_OK
exit
      ret
germdt endp
      END germdt


* $$ EOJ
Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.

herge

[code; GERMAN.ASM Tuesday, November 15, 2011 5:21:50 PM
; Sunday, August 25, 2013 10:47:17 PM
include \masm32\include\masm32rt.inc

.data
dtbuf db 260 dup(0)
      db 0
stm     SYSTEMTIME<>
AppName db "Datum & Uhrzeit in Bonn", 0
timFormat   db "hh':'mm':'ss tt"
crlf db 13, 10, 0
; LCID was 1031 Germany, UK 2057
.code
public  germdt
germdt proc
      invoke GetSystemTime, addr stm; get UTC
      mov   ax, word ptr stm.wHour
      inc   ax; Make GMT + 1 i e German Time
      mov word ptr   stm.wHour, ax
      invoke GetDateFormat, 1031, DATE_LONGDATE, 0, 0, addr dtbuf, SIZEOF dtbuf
mov esi, offset dtbuf
      add esi, eax
      mov   byte ptr [esi-1], " " ; replace null with space
      invoke GetTimeFormat, 2057, 0, addr stm, addr timFormat, esi, 40
      mov   esi, offset dtbuf 
invoke MessageBox, 0, addr dtbuf, addr AppName, MB_OK
exit
      ret
germdt endp
      END germdt
]


*$$ EOJ

http://support.microsoft.com/kb/221435

Word Microsoft site about LCID

1031 no AM/PM
2057 Yes AM/PM



Regards herge
Read "Slow Death by Rubber Duck"
for chemical Laughs.