Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time format fix for last login times #693

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
91aae96
Minor correction to the id prop
Jan 11, 2023
18347a3
Merge remote-tracking branch 'upstream/develop' into fix-id-version-i…
Jan 11, 2023
61b0031
minor refactoring
Jan 11, 2023
dda1b45
Fix missing code in refactoring
Jan 11, 2023
9d08f0f
Merge remote-tracking branch 'upstream/develop' into fix-id-version-i…
Jan 11, 2023
9139aa5
Merge remote-tracking branch 'upstream/develop' into fix-id-version-i…
Jan 12, 2023
e866dd1
Added timezone logger
Jan 12, 2023
7a5ea9c
Merge remote-tracking branch 'upstream/develop' into timeszone-test
Jan 12, 2023
29694a5
Merge remote-tracking branch 'upstream/develop' into timeszone-test
Jan 12, 2023
08f0d9c
Merge remote-tracking branch 'upstream/develop' into timeszone-test
Jan 12, 2023
608982e
Minor correction
Jan 12, 2023
c0c27dd
Pom correction
Jan 12, 2023
58b4d11
Merge remote-tracking branch 'upstream/develop' into timeszone-test
Jan 16, 2023
ba8391c
Added timezone based timestamp responses for related APIs
Jan 18, 2023
b65d768
Code to apply timezone offset in timestamp in filename
Jan 18, 2023
6daf6f2
Test fixes
Jan 18, 2023
90cb108
Merge remote-tracking branch 'upstream/develop' into add-timezone-bas…
Jan 18, 2023
35c10c3
Test fix
Jan 18, 2023
7e0c42c
test gix
Jan 18, 2023
e833f3f
Fix to filename pattern
Jan 18, 2023
da64cc0
Merge remote-tracking branch 'upstream/develop' into add-timezone-bas…
Jan 18, 2023
ecfa1d1
Added missing file
Jan 18, 2023
52dc335
Merge remote-tracking branch 'upstream/develop' into add-timezone-bas…
Jan 18, 2023
84a22a9
Refactored to fix utility class name
Jan 18, 2023
019aee3
Merge remote-tracking branch 'upstream/develop' into refactor-fix-uti…
Jan 18, 2023
c278423
Refactored to fix utility class name
Jan 18, 2023
21cf6ff
Merge remote-tracking branch 'upstream/develop' into refactor-fix-uti…
Jan 19, 2023
c416c3c
Fixed last login time offset; filename timestamp; vid generated on time;
Jan 19, 2023
a2c5ab4
Fix timezone for view history download request time
Jan 19, 2023
31b6f7e
Merge remote-tracking branch 'upstream/develop' into time-format-fix-…
Jan 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public ResponseEntity<Object> downloadPersonalizedCard(@Validated @RequestBody M
Map.of(ResidentConstants.HTTP_STATUS_CODE, HttpStatus.BAD_REQUEST, ResidentConstants.REQ_RES_ID,
environment.getProperty(ResidentConstants.MOSIP_RESIDENT_DOWNLOAD_PERSONALIZED_CARD_ID)));
}
Tuple2<byte[], String> tupleResponse = downloadCardService.downloadPersonalizedCard(downloadPersonalizedCardMainRequestDTO);
Tuple2<byte[], String> tupleResponse = downloadCardService.downloadPersonalizedCard(downloadPersonalizedCardMainRequestDTO, timeZoneOffset);
InputStreamResource resource = new InputStreamResource(new ByteArrayInputStream(tupleResponse.getT1()));
if(tupleResponse.getT1().length==0){
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public interface DownloadCardService {
Tuple2<byte[], String> getDownloadCardPDF(MainRequestDTO<DownloadCardRequestDTO> downloadCardRequestDTOMainRequestDTO);

Tuple2<byte[], String> downloadPersonalizedCard(MainRequestDTO<DownloadPersonalizedCardDto> downloadPersonalizedCardMainRequestDTO);
Tuple2<byte[], String> downloadPersonalizedCard(MainRequestDTO<DownloadPersonalizedCardDto> downloadPersonalizedCardMainRequestDTO, int timeZoneOffset);

Tuple2<ResponseWrapper<VidDownloadCardResponseDto>, String> getVidCardEventId(String vid, int timeZoneOffset) throws BaseCheckedException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ResponseWrapper<EventStatusResponseDTO> getEventStatus(String id, String eventId

byte[] downLoadServiceHistory(ResponseWrapper<PageDto<ServiceHistoryResponseDto>> responseWrapper,
String languageCode, LocalDateTime eventReqDateTime, LocalDate fromDateTime, LocalDate toDateTime,
String serviceType, String statusFilter) throws ResidentServiceCheckedException, IOException;
String serviceType, String statusFilter, int timeZoneOffset) throws ResidentServiceCheckedException, IOException;

public ResponseWrapper<UserInfoDto> getUserinfo(String Id, int timeZoneOffset) throws ApisResourceAccessException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ public ResponseWrapper<List<UnreadServiceNotificationDto>> getUnreadnotifylist(S
*/
public byte[] downLoadServiceHistory(ResponseWrapper<PageDto<ServiceHistoryResponseDto>> responseWrapper,
String languageCode, LocalDateTime eventReqDateTime, LocalDate fromDate, LocalDate toDate,
String serviceType, String statusFilter) throws ResidentServiceCheckedException, IOException {
String serviceType, String statusFilter, int timeZoneOffset) throws ResidentServiceCheckedException, IOException {

logger.debug("ResidentServiceImpl::getResidentServicePDF()::entry");
String requestProperty = this.env.getProperty(ResidentConstants.SERVICE_HISTORY_PROPERTY_TEMPLATE_TYPE_CODE);
Expand Down Expand Up @@ -2172,7 +2172,7 @@ public byte[] downLoadServiceHistory(ResponseWrapper<PageDto<ServiceHistoryRespo
if(serviceType == null){
serviceType = ALL;
}
servHistoryMap.put("eventReqTimeStamp", utility.formatWithOffsetForUI(0, eventReqDateTime));//No change to the offset - keep the incoming timestamp with same offset
servHistoryMap.put("eventReqTimeStamp", utility.formatWithOffsetForUI(timeZoneOffset, eventReqDateTime));
servHistoryMap.put("fromDate", fromDate);
servHistoryMap.put("toDate", toDate);
servHistoryMap.put("statusFilter", statusFilter);
Expand Down