diff options
Diffstat (limited to 'linden/indra/newview/llpanelavatar.cpp')
-rw-r--r-- | linden/indra/newview/llpanelavatar.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index bfcc04a..1701f69 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -1882,6 +1882,28 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1882 | } | 1882 | } |
1883 | 1883 | ||
1884 | self->mPanelSecondLife->childSetValue("acct", caption_text); | 1884 | self->mPanelSecondLife->childSetValue("acct", caption_text); |
1885 | |||
1886 | //Chalice - Show avatar age in days. | ||
1887 | int year; | ||
1888 | int month; | ||
1889 | int day; | ||
1890 | sscanf(born_on.c_str(), "%d/%d/%d", &month, &day, &year); | ||
1891 | time_t now = time(NULL); | ||
1892 | struct tm * timeinfo; | ||
1893 | timeinfo = localtime(&now); | ||
1894 | timeinfo->tm_mon = --month; | ||
1895 | timeinfo->tm_year = year - 1900; | ||
1896 | timeinfo->tm_mday = day; | ||
1897 | time_t birth = mktime(timeinfo); | ||
1898 | std::stringstream numberString; | ||
1899 | numberString << (S32)(difftime(now, birth) / 86400); //(60*60*24) | ||
1900 | |||
1901 | LLStringUtil::format_map_t targs; | ||
1902 | targs["[DAYS]"] = numberString.str(); | ||
1903 | std::string born_msg = self->mPanelSecondLife->getString("days_old_text"); | ||
1904 | LLStringUtil::format(born_msg, targs); | ||
1905 | born_on += " "; | ||
1906 | born_on += born_msg; | ||
1885 | self->mPanelSecondLife->childSetValue("born", born_on); | 1907 | self->mPanelSecondLife->childSetValue("born", born_on); |
1886 | 1908 | ||
1887 | EOnlineStatus online_status = (online) ? ONLINE_STATUS_YES : ONLINE_STATUS_NO; | 1909 | EOnlineStatus online_status = (online) ? ONLINE_STATUS_YES : ONLINE_STATUS_NO; |