-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix time display emails #902
Conversation
…lt time format and time zone. Also the time zone is shown.
@@ -38,9 +38,13 @@ | |||
|
|||
private final Optional<String> uiBaseUrl; | |||
private final Optional<SMTPConfiguration> smtpConfiguration; | |||
private String taskDatePattern; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make these final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
@Inject | ||
public MailTemplateHelpers(SandboxManager sandboxManager, SingularityConfiguration singularityConfiguration) { | ||
taskDatePattern = singularityConfiguration.getDefaultDatePattern(); | ||
timeZone = singularityConfiguration.getTimeZone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets follow the format of the ones below with this.x = ...
@@ -76,6 +77,8 @@ | |||
@Min(value = 1, message = "Must be positive and non-zero") | |||
private int defaultBounceExpirationMinutes = 60; | |||
|
|||
private String mailerDatePattern = "MMM dd h:mm:ss a zzz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move these mailer* config fields into SMTPConfiguration
|
||
import org.apache.commons.lang3.text.WordUtils; | ||
import org.apache.commons.lang3.time.DateFormatUtils; | ||
import org.apache.commons.lang3.tuple.Pair; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think this import is necessary
In pause emails, when an expiration time was set: