Pankhuri
1st December 2008, 13:30
There are two cases in which utc.add function is giving incorrect result-
Case 1-
Consider,
i.date = 1 December 2008,
hold.mfsh = 23,
plst.stdt is reference variable.
The utc.add function was written like this-
utc.add (i.date,
0,
-1 * hold.mfsh,
0,
0,
0,
0,
plst.stdt)
After utc.add function is executed plst.stdt comes as 1 January 2006 which is incorrect.
It should come as 1 February 2007.
Case 2-
Consider,
i.date = 1 December 2008,
hold.mfsh = 24,
plst.stdt is reference variable.
The utc.add function was written like this-
hold.mfsh = hold.mfsh - 1
e = utc.add(i.date,
0,
-1 * hold.mfsh,
0,
0,
0,
0,
temp.date)
e = utc.add (temp.date,
0,
-1,
0,
0,
0,
0,
plst.stdt)
here temp.date is temporary variable
After utc.add function is executed plst.stdt comes as 1 January 2005 which is incorrect.
It should come as 1 January 2007.
Does anbody knows why this problem is coming and how to solve this?
Thanks and Regards,
Pankhuri
Case 1-
Consider,
i.date = 1 December 2008,
hold.mfsh = 23,
plst.stdt is reference variable.
The utc.add function was written like this-
utc.add (i.date,
0,
-1 * hold.mfsh,
0,
0,
0,
0,
plst.stdt)
After utc.add function is executed plst.stdt comes as 1 January 2006 which is incorrect.
It should come as 1 February 2007.
Case 2-
Consider,
i.date = 1 December 2008,
hold.mfsh = 24,
plst.stdt is reference variable.
The utc.add function was written like this-
hold.mfsh = hold.mfsh - 1
e = utc.add(i.date,
0,
-1 * hold.mfsh,
0,
0,
0,
0,
temp.date)
e = utc.add (temp.date,
0,
-1,
0,
0,
0,
0,
plst.stdt)
here temp.date is temporary variable
After utc.add function is executed plst.stdt comes as 1 January 2005 which is incorrect.
It should come as 1 January 2007.
Does anbody knows why this problem is coming and how to solve this?
Thanks and Regards,
Pankhuri