You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mark Womack <mw...@apache.org> on 2006/04/05 07:27:20 UTC

Compile error

I am getting these compile errors when compiling with 1.3.  The 
getOffset(long) method is not supported in jdk 1.3:

    [javac] 
F:\development\code-svn-apache-projects\logging-log4j\tests\src\java\org\apache\log4j\helpers\DateLayoutTest
.java:239: cannot resolve symbol
    [javac] symbol  : method getOffset  (int)
    [javac] location: class java.util.TimeZone
    [javac]       String actual = format.format(new 
Date(-TimeZone.getDefault().getOffset(0)));
    [javac] 
^
    [javac] 
F:\development\code-svn-apache-projects\logging-log4j\tests\src\java\org\apache\log4j\helpers\DateLayoutTest
.java:249: cannot resolve symbol
    [javac] symbol  : method getOffset  (int)
    [javac] location: class java.util.TimeZone
    [javac]       String actual = format.format(new 
Date(-TimeZone.getDefault().getOffset(0)));

Can we use the old getOffset with all the values set for 1/1/1970?

-Mark 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Compile error

Posted by Mark Womack <mw...@apache.org>.
Thanks!

-Mark

----- Original Message ----- 
From: "Curt Arnold" <ca...@apache.org>
To: "Log4J Developers List" <lo...@logging.apache.org>
Sent: Wednesday, April 05, 2006 8:29 AM
Subject: Re: Compile error


> Sorry, hadn't noticed the since 1.4 on the getOffset(long) method.   
> The getOffset(int, int, int...) method doesn't describe what the era  
> parameter is meant to be and expects that you know the day of the  
> week.  I've rewritten the code to use a calendar to get the arbitrary  
> date in the current time zone.  I've committed it to the HEAD and  
> will go back and commit it to the 1_2-branch after lunch.
> 
> 
> On Apr 5, 2006, at 12:27 AM, Mark Womack wrote:
> 
>> I am getting these compile errors when compiling with 1.3.  The  
>> getOffset(long) method is not supported in jdk 1.3:
>>
>>    [javac] F:\development\code-svn-apache-projects\logging-log4j 
>> \tests\src\java\org\apache\log4j\helpers\DateLayoutTest
>> .java:239: cannot resolve symbol
>>    [javac] symbol  : method getOffset  (int)
>>    [javac] location: class java.util.TimeZone
>>    [javac]       String actual = format.format(new Date(- 
>> TimeZone.getDefault().getOffset(0)));
>>    [javac] ^
>>    [javac] F:\development\code-svn-apache-projects\logging-log4j 
>> \tests\src\java\org\apache\log4j\helpers\DateLayoutTest
>> .java:249: cannot resolve symbol
>>    [javac] symbol  : method getOffset  (int)
>>    [javac] location: class java.util.TimeZone
>>    [javac]       String actual = format.format(new Date(- 
>> TimeZone.getDefault().getOffset(0)));
>>
>> Can we use the old getOffset with all the values set for 1/1/1970?
>>
>> -Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Compile error

Posted by Curt Arnold <ca...@apache.org>.
Sorry, hadn't noticed the since 1.4 on the getOffset(long) method.   
The getOffset(int, int, int...) method doesn't describe what the era  
parameter is meant to be and expects that you know the day of the  
week.  I've rewritten the code to use a calendar to get the arbitrary  
date in the current time zone.  I've committed it to the HEAD and  
will go back and commit it to the 1_2-branch after lunch.


On Apr 5, 2006, at 12:27 AM, Mark Womack wrote:

> I am getting these compile errors when compiling with 1.3.  The  
> getOffset(long) method is not supported in jdk 1.3:
>
>    [javac] F:\development\code-svn-apache-projects\logging-log4j 
> \tests\src\java\org\apache\log4j\helpers\DateLayoutTest
> .java:239: cannot resolve symbol
>    [javac] symbol  : method getOffset  (int)
>    [javac] location: class java.util.TimeZone
>    [javac]       String actual = format.format(new Date(- 
> TimeZone.getDefault().getOffset(0)));
>    [javac] ^
>    [javac] F:\development\code-svn-apache-projects\logging-log4j 
> \tests\src\java\org\apache\log4j\helpers\DateLayoutTest
> .java:249: cannot resolve symbol
>    [javac] symbol  : method getOffset  (int)
>    [javac] location: class java.util.TimeZone
>    [javac]       String actual = format.format(new Date(- 
> TimeZone.getDefault().getOffset(0)));
>
> Can we use the old getOffset with all the values set for 1/1/1970?
>
> -Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org