File tree Expand file tree Collapse file tree 4 files changed +28
-11
lines changed
main/java/com/genexus/JWT/utils
test/java/com/genexus/test/jwt/features Expand file tree Collapse file tree 4 files changed +28
-11
lines changed Original file line number Diff line number Diff line change 57
57
<groupId >${project.groupId} </groupId >
58
58
<artifactId >securityapicommons</artifactId >
59
59
<type >test-jar</type >
60
- <version >${project.version } </version >
60
+ <version >${revision}${changelist } </version >
61
61
<scope >test</scope >
62
62
</dependency >
63
63
</dependencies >
71
71
<artifactId >maven-compiler-plugin</artifactId >
72
72
<version >3.8.0</version >
73
73
</plugin >
74
+ <plugin >
75
+ <groupId >org.apache.maven.plugins</groupId >
76
+ <artifactId >maven-jar-plugin</artifactId >
77
+ <version >3.1.1</version >
78
+ <executions >
79
+ <execution >
80
+ <goals >
81
+ <goal >test-jar</goal >
82
+ </goals >
83
+ </execution >
84
+ </executions >
85
+ </plugin >
74
86
</plugins >
75
87
</build >
76
88
Original file line number Diff line number Diff line change 5
5
import java .text .DateFormat ;
6
6
import java .text .SimpleDateFormat ;
7
7
import java .util .Date ;
8
+ import java .util .TimeZone ;
8
9
9
10
public class UnixTimestampCreator extends SecurityAPIObject {
10
11
@@ -17,6 +18,7 @@ public String create(String date)
17
18
{
18
19
Date datef = null ;
19
20
DateFormat dateFormat = new SimpleDateFormat ("yyyy/MM/dd HH:mm:ss" );
21
+ dateFormat .setTimeZone (TimeZone .getTimeZone ("GMT" ));
20
22
try {
21
23
22
24
datef = dateFormat .parse (date );
Original file line number Diff line number Diff line change @@ -28,22 +28,13 @@ public void runTest() {
28
28
public void setUp () {
29
29
date = "2023/07/19 11:41:00" ;
30
30
creator = new UnixTimestampCreator ();
31
- expected = "1689777660 " ;
31
+ expected = "1689766860 " ;
32
32
}
33
33
34
34
35
35
public void testCreate ()
36
36
{
37
- System .out .println ("date: " + date );
38
37
String obtained = creator .create (date );
39
- if (creator .hasError ())
40
- {
41
- System .out .println ("Error. Code: " + creator .getErrorCode () + " Desc: " + creator .getErrorDescription ());
42
- }else {
43
- System .out .println ("No error" );
44
- }
45
- System .out .println ("expected: " + expected );
46
- System .out .println ("obtained: " + obtained );
47
38
Equals (expected , obtained , creator );
48
39
}
49
40
}
Original file line number Diff line number Diff line change 34
34
<artifactId >maven-compiler-plugin</artifactId >
35
35
<version >3.8.0</version >
36
36
</plugin >
37
+ <plugin >
38
+ <groupId >org.apache.maven.plugins</groupId >
39
+ <artifactId >maven-jar-plugin</artifactId >
40
+ <version >3.1.1</version >
41
+ <executions >
42
+ <execution >
43
+ <goals >
44
+ <goal >test-jar</goal >
45
+ </goals >
46
+ </execution >
47
+ </executions >
48
+ </plugin >
37
49
</plugins >
38
50
</build >
39
51
You can’t perform that action at this time.
0 commit comments