Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 831605 Details for
Bug 1021558
Spacewalk fails to generate DEB repository error on "setBuildTime"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Solves problem, but maybe not the right way??
javapatch.patch (text/plain), 1.55 KB, created by
Martin Juhl
on 2013-12-02 14:31:19 UTC
(
hide
)
Description:
Solves problem, but maybe not the right way??
Filename:
MIME Type:
Creator:
Martin Juhl
Created:
2013-12-02 14:31:19 UTC
Size:
1.55 KB
patch
obsolete
>--- java/code/src/com/redhat/rhn/frontend/dto/PackageDto.java 2013-11-29 12:32:00.150127819 +0100 >+++ java/code/src/com/redhat/rhn/frontend/dto/PackageDto.java.new 2013-12-02 15:26:51.469600040 +0100 >@@ -24,6 +24,9 @@ > import java.text.SimpleDateFormat; > import java.util.Date; > import java.util.TimeZone; >+ >+import java.util.GregorianCalendar; >+ > /** > * PackageDto > * @version $Rev$ >@@ -273,14 +276,21 @@ > * @throws RhnRuntimeException when buildTimeIn can't be parsed > */ > public void setBuildTime(Date buildTimeIn) throws RhnRuntimeException { >- SimpleDateFormat dateFormatGMT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); >- dateFormatGMT.setTimeZone(TimeZone.getTimeZone("GMT")); >- try { >- this.buildTime = dateFormatGMT.parse(buildTimeIn.toString()); >- } >- catch (ParseException e) { >- throw new RhnRuntimeException(e); >- } >+ SimpleDateFormat dateFormatGMT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); >+ dateFormatGMT.setTimeZone(TimeZone.getTimeZone("GMT")); >+ >+ try { >+ if(buildTimeIn == null){ >+ GregorianCalendar newGregCal = new GregorianCalendar(); >+ buildTimeIn = dateFormatGMT.parse(dateFormatGMT.format(newGregCal.getTime())); >+ this.buildTime = dateFormatGMT.parse(dateFormatGMT.format(dateFormatGMT.parse(dateFormatGMT.format(newGregCal.getTime())))); >+ }else >+ >+ this.buildTime = dateFormatGMT.parse(buildTimeIn.toString()); >+ } >+ catch (ParseException e) { >+ throw new RhnRuntimeException(e); >+ } > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1021558
:
814615
| 831605