Jump to content


Annoying date problem


11 replies to this topic

#1 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 06 December 2007 - 10:29 PM

Although it is a display issue and therefore not a top priority, apup always switches the month with the day if the day starts with a 0, but if the day has two digits it is displayed correctly. See the following screenshot:

Posted Image

#2 Pedro

    Advanced Member

  • Validating
  • PipPipPip
  • 111 posts
  • Gender:Male
  • Location:Portugal

Posted 06 December 2007 - 11:21 PM

View PostCyrus, on Dec 6 2007, 10:29 PM, said:

Although it is a display issue and therefore not a top priority, apup always switches the month with the day if the day starts with a 0, but if the day has two digits it is displayed correctly.

This is not a display bug. If you check the date of your apup.exe file (using explorer) you will notice that the date is also wrong. It was some mistake by Antonis or Renato when creating the files.

#3 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 06 December 2007 - 11:29 PM

No, it is a display bug. Bolow I have copied part of the releases.list file which sets the dates that apup should display. As you can see, the list is fine, it's a bug in the program that displays dates incorrectly.

# Release List

Name=AutoPatcher Updater 1.0.3
Date=20071203

Name=AutoPatcher Engine 5.6.81
Date=20071130

Name=AutoPatcher for Windows XP (x86) - Beta v3.3
Date=20071127

Name=AutoPatcher for Windows 2000 (x86) - Beta v1.2
Date=20071126

Name=AutoPatcher for Windows XP/2003 (x64) - Beta v2.2
Date=20071130

Name=AutoPatcher para Windows XP (x86) - Beta v2.3
Date=20071203

Name=AutoPatcher para Windows 2000 (x86) - Beta v0.1
Date=20071127

Name=AutoPatcher para Windows 2003 (x86) - Beta v0.1
Date=20071127

Name=AutoPatcher per Windows XP (x86) - Beta v1.0
Date=20071126

Name=DirectX Addon for AutoPatcher (x86)
Date=20071204

Name=AutoPatcher for Office 2007 -- English
Date=20071123

Name=AutoPatcher for Office 2003 -- English
Date=20071123

Name=AutoPatcher for Office XP -- English
Date=20071123

Edit: What mistake do you see in the date of apup.exe? It shows up correctly on my machine.

Edited by Cyrus, 06 December 2007 - 11:31 PM.


#4 Erik Ramey

    AutoPatcher Elite

  • Veterans
  • PipPipPipPipPip
  • 766 posts
  • Gender:Male
  • Location:Washington State

Posted 07 December 2007 - 12:49 AM

Look at that.... I was assuming the same thing as Pedro. Any thoughts Renato?

#5 darthyoda6

    Member

  • Members
  • PipPip
  • 31 posts
  • Gender:Male
  • Location:Canada

Posted 07 December 2007 - 05:35 AM

I have the same problem as Cyrus.
Is format being used to generate the display, 'cause if when I use format in vb6 I get displayed

d$ as "30 Nov 2007"
d2$ as "3 Dec 2007"

d$ = "20071130"
d2$ = "20071203"
d$ = Left(d$, 4) + "/" + Mid(d$, 5, 2) + "/" + Right(d$, 2)
d2$ = Left(d2$, 4) + "/" + Mid(d2$, 5, 2) + "/" + Right(d2$, 2)
Label1.caption = Format(d$, "d mmm yyyy")
Label2.caption = Format(d2$, "d mmm yyyy")

Edited by darthyoda6, 07 December 2007 - 05:35 AM.


#6 Rudy

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts
  • Gender:Male
  • Location:Melbourne

Posted 08 December 2007 - 09:22 AM

On my system the date displays correctly.

Edited by Rudy, 08 December 2007 - 09:23 AM.


#7 sh1leshk4

    Using AP since...then. =b

  • Members
  • PipPipPip
  • 116 posts
  • Gender:Male

Posted 09 December 2007 - 07:37 PM

On my system it also displays the date correctly.

There might be something wrong when converting the date format into a system's (date & time) local setting.

#8 Erik Ramey

    AutoPatcher Elite

  • Veterans
  • PipPipPipPipPip
  • 766 posts
  • Gender:Male
  • Location:Washington State

Posted 09 December 2007 - 08:35 PM

Ahhhh.. I think I see what the issue is. March 12 = 3/12. Depending on how you setup your local, this can be seen as March 12, or December 3rd

#9 sh1leshk4

    Using AP since...then. =b

  • Members
  • PipPipPip
  • 116 posts
  • Gender:Male

Posted 10 December 2007 - 04:12 AM

Yup.
And with dates numbering after 12, the formatting would turn out correct since there are no months numbered 13+ and probably it's apup's behavior to "read" the other way around.

Easy (read: quick & dirty) solution for this would be not to make the date formatting adapt to a system's local settings.
If it's 20071203 then it should only be 3 Dec 2007 or yyyymmdd -> dd mm yyyy; no need for localization whatsoever.
I'm pretty sure everyone here knows the months' name in English. =)

#10 darthyoda6

    Member

  • Members
  • PipPip
  • 31 posts
  • Gender:Male
  • Location:Canada

Posted 10 December 2007 - 05:33 AM

If you use the fornat command, I believe that it uses the regional setting for the month name.

#11 sh1leshk4

    Using AP since...then. =b

  • Members
  • PipPipPip
  • 116 posts
  • Gender:Male

Posted 11 December 2007 - 01:54 AM

Well, the current apup.exe actually does that; it shows the month's name according to the local settings.
But it seems something got mixed up when the date string is tokenized or something; dunno. =)

#12 Cyrus

    AutoPatcher Expert

  • Members
  • PipPipPipPip
  • 254 posts
  • Gender:Male

Posted 11 December 2007 - 02:08 AM

Antonis could just create a switch statement for which month to output, and then print the day and year directly from the string in the releases file.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users