lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lmi] Creating end-user packages for msw


From: Murphy, Kimberly
Subject: RE: [lmi] Creating end-user packages for msw
Date: Mon, 22 Mar 2010 14:26:47 -0400

Greg Chicares wrote:
> On 2008-04-22 15:52Z, Greg Chicares wrote:
> > Packaging several monthly binary distributions for different end-
> > user groups has become stressful if not nightmarish. It must be
> > done in time for CDs to be received by field offices before the
> > first of each month; but it can't be done until crediting rates
> > are declared, which may be very close to the end of the month.
> 
> 'workhorse.make' says:
> 
> # The first value assigned to 'd1' shows one possibility for the
> # beginning date. It's deliberately overridden with another that sets
> # the beginning date to the current date. The obvious y2038 problem is
> # ignored because any breakage it causes will be obvious.
> 
> fardel_date_script := \
>   d0=`$(DATE) +%Y-%m-01`; \
>   d1=`$(DATE) --utc --date="$$d0 + 1 month         " +%s`; \
>   d1=`$(DATE) --utc +%s`; \
>   d2=`$(DATE) --utc --date="$$d0 + 2 months - 1 day" +%s`; \
>   j1=`expr 2440587 + $$d1 / 86400`; \
>   j2=`expr 2440587 + $$d2 / 86400`; \
>   echo -n "$$j1 $$j2" >expiry; \
> 
> Now let me illustrate:
> 
> $date
> Fri Mar 19 19:17:37 GMTST 2010
> $d0=`date +%Y-%m-01`
> $date --utc --date="$d0 + 1 month         "
> Thu Apr  1 00:00:00 UTC 2010
> $date --utc --date="$d0 + 2 months - 1 day"
> Fri Apr 30 00:00:00 UTC 2010
> 
> We could override $fardel_date_script if we want a different outcome
> than the default provided, or change it if that's not an appropriate
> default.

The first of a given month is appropriate for most end-user 
packages. On occasion, some end-users are provided the system 
a few days earlier. Waiting until the first of the month may 
not be a hardship in most situations, unless of course there's 
a feature someone wants to get their hands on. In this case, 
the 'fardel_date_script' could be overridden.

Converting the default beginning date in the fardel_date_script 
to Julian date, I get:

  The Julian date for CE  2010 April  1 00:00:00.0 UT is
  JD 2455287.50000

However, if I was to manually enter the date in the expiry, 
I would enter a Julian date of:

  The Julian date for CE  2010 April  1 12:00:00.0 UT is
  JD 2455288.00000

The end date for all packages is the first of the following 
month at midnight, and manually entered would be:

  The Julian date for CE  2010 May  1 12:00:00.0 UT is
  JD 2455318.00000

while the script generates:

  The Julian date for CE  2010 April 30 00:00:00.0 UT is
  JD 2455316.50000

---------------------------------------------------------
This e-mail transmission may contain information that is 
proprietary, privileged and/or confidential and is
intended exclusively for the person(s) to whom it is
addressed. Any use, copying, retention or disclosure by
any person other than the intended recipient or the
intended recipient's designees is strictly prohibited. If
you are not the intended recipient or their designee,
please notify the sender immediately by return e-mail and
delete all copies.
---------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]