Hi all,

According to this document, the auto-generated revision number for an
assembly is the number of seconds since midnight divided by 2. I'm testing
this with my code but the revision comes out 60 minutes ahead.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionassemblyversionattributeclasstopic.asp

Here's the code:

DateTime now = DateTime.Now;
DateTime jan2000 = new DateTime(2000, 1, 1);
int build = (int)now.Subtract(jan2000).TotalDays;
int revision = (int)now.Subtract(DateTime.Today).TotalSeconds / 2;
textBox1.Text += "assembly version: " +
Assembly.GetExecutingAssembly().GetName().Version.ToString() +
Environment.NewLine;
textBox1.Text += "Build: " + build + Environment.NewLine;
textBox1.Text += "Rev: " + revision + Environment.NewLine;


Here's the output:

assembly version: 1.0.1731.23390
Build: 1731
Rev: 25192

Any ideas on how to properly calculate the Revision number?
Thanks,

-Oleg.

Re: AssemblyVersionAttribute by Richard

Richard
Mon Sep 27 13:45:02 CDT 2004

Is it an issue with Daylight Saving?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.framework/<10lglpaa2aqmr40@corp.supernews.com>

Hi all,

According to this document, the auto-generated revision number for an
assembly is the number of seconds since midnight divided by 2. I'm testing
this with my code but the revision comes out 60 minutes ahead.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionassemblyversionattributeclasstopic.asp

Here's the code:

DateTime now = DateTime.Now;
DateTime jan2000 = new DateTime(2000, 1, 1);
int build = (int)now.Subtract(jan2000).TotalDays;
int revision = (int)now.Subtract(DateTime.Today).TotalSeconds / 2;
textBox1.Text += "assembly version: " +
Assembly.GetExecutingAssembly().GetName().Version.ToString() +
Environment.NewLine;
textBox1.Text += "Build: " + build + Environment.NewLine;
textBox1.Text += "Rev: " + revision + Environment.NewLine;


Here's the output:

assembly version: 1.0.1731.23390
Build: 1731
Rev: 25192

Any ideas on how to properly calculate the Revision number?
Thanks,

-Oleg.




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.769 / Virus Database: 516 - Release Date: 24/09/2004



[microsoft.public.dotnet.framework]