Closed (fixed)
Project:
IP-based Determination of a Visitor's Country
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2011 at 00:05 UTC
Updated:
3 Nov 2013 at 06:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tr commentedI coded it like that because core Drupal does not have a way to display a localized date and time separately - format_date() prints an entire date-time string, which is not what I want. The only way around that is to use the 'custom' format.
If you know a way to print the localized date and localized time separately, I will be happy to add that to the module.
Comment #2
johncs commentedThe custom date format used here is the least satisfactory to most users - as far as I can tell, only USA uses m/d/y.
Comment #3
tr commentedIf you have a suggestion for how to add the ability to localize this date, given Drupal's shortcomings, then please post it here.
Comment #4
johncs commentedI have little idea of how Drupal works.
However, if you must use a format that isn't properly localised, how about yyyy/mm/dd?
Surely that will confuse nobody.
Comment #5
tr commentedHere's a patch to allow the date and time formats to be individually configured. You have to apply the patch, run update.php, clear your cache, then visit admin/config/regional/date-time to choose your preferred formats for the date and time display that appears on the ip2country admin page.
This adds 150 lines of code that is to every page load, and seems like an excessive amount of code just to provide a one-time setting for an admin-only page. This is entirely due to Drupal core not providing separate date and time settings - core always assumes date and time will be displayed together, never separately.
If you care about seeing this change put into the module, please test the patch and report your results here.
Comment #7
tr commentedLet's try this again ...
Comment #8
tr commentedSame patch, but this time I've moved the hook_date_formats() implementation out of .module so that those 150 lines of code aren't loaded all the time. This should now have a minimal impact.
Anyone care enough to test this?
Comment #9
tr commentedCommitted. I don't intend to try to backport this to 6.x-1.x, although if someone wants to try that and submit a patch I'll be happy to include it.